The Enumerable mixin provides collection classes with several traversal and searching methods, and with the ability to sort. The class must provide a method each, which yields successive members of the collection.
This project was very challenging for my. I read a lot to come up with this solution, this is what worked for me, but I was also found at least 5 other ways to solve this exercise.
I used too methods, 1) yield and 2) procs and blocks
Additional description about the project and its features.
- Ruby
👤 Julio Anoveros
- Github: @jubaan
- Twitter: @AnoverosJulio
- Linkedin: linkedin
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
These were the resources that help me the most to understand how to do this project.
https://mauricio.github.io/2015/01/12/implementing-enumerable-in-ruby.html
https://github.com/rubinius/rubinius/blob/v4.5/core/enumerable.rb#L370-L403
https://stackoverflow.com/questions/39957124/how-to-create-a-custom-implementation-of-inject-method
https://blog.codeship.com/the-enumerable-module/
https://github.com/kitpao/my_enumerable_methods/blob/develop_branch/my_methods.rb
https://github.com/rubinius/rubinius/blob/v4.5/core/enumerable.rb#L370-L403Hat tip to anyone whose code was used
This project is MIT licensed.