Ruby-enumerable-methods

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

Stars
7

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.

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 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:
$ ruby enumerables.rb

Running the RSpec tests

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

Validators

  • Rubocop
  • Stickler

Testing tool

  • RSpec

Authors

Miguel Tapia Escalera (Meltrust)

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

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 licensed.

Related Projects