Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/meltrust/ruby-enumerable-methods

In this project, I will implement my own version of Ruby’s enumerable methods.
https://github.com/meltrust/ruby-enumerable-methods

Last synced: 10 days ago
JSON representation

In this project, I will implement my own version of Ruby’s enumerable methods.

Awesome Lists containing this project

README

        

# Home-made Ruby enumerable methods!!

> I wrote my own versions of some of the most iconic (and used) Ruby enumerable methods. Implemented RSpec tests for all.

To prove that there's no magic to the original Ruby enumerable methods, I rebuilt #each, #each_with_index, #select, #all?, #any?, #none?, #count, #map and #inject. Then I wrote RSpec tests for all.

![screenshot](demo.gif)

## Built With

- Ruby!
- RSpec
- VsCode

## Getting Started

To get a local copy up and running follow these simple example steps:

- Be sure to have [ruby](https://www.ruby-lang.org/en/documentation/installation/) installed in your machine.
- Clone this repository into an empty directory of your choice.
- Run the enumerables.rb by typing this in your command line:
```bash
$ ruby enumerables.rb
```

## Running the RSpec tests

- Install and run RSpec in the root directory of the project:
```bash
$ gem install rspec
$ rspec spec/enumerable_spec.rb
```

### Validators

- Rubocop
- Stickler

### Testing tool

- RSpec

## Authors

👤 **Miguel Tapia Escalera (Meltrust)**

- Twitter: [@twitterhandle](https://twitter.com/twitterhandle)
- Linkedin: [linkedin](https://www.linkedin.com/in/meltrust/)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the [issues page](issues/).

## Show your support

Give a ⭐️ if you like this project!

## Acknowledgments

- Hat tip to anyone whose code was used
- Inspiration
- etc

## 📝 License

This project is [MIT](lic.url) licensed.