/enumerables-ruby

Recreate from scratch some enumerable methods of Ruby language

Primary LanguageRuby

Advanced Building Blocks - Enumerable Methods

This project consisted of recreating from scratch some of the Enumerable Methods present in Ruby and match the expected output with the original method (https://ruby-doc.org/core-2.7.0/Enumerable.html). The learning process of this project focused mainly on gaining knowledge on how to work with yield.

The methods recreated were:

  • .each
  • .each_with_index
  • .select
  • .all?
  • .any?
  • .none?
  • .count
  • .map
  • .inject

As an additional requirement it was needed to:

  • Create .multiply_els method to test .inject
  • Extends .map to accept procs

Screenshots

screenshot

Live version

Live Version

Built With

  • Ruby
  • VSCode
  • Rubocop (Linter) with Stickler (CI Tool)

Getting Started

To get a local copy of the repository please run the following commands on your terminal:

$ cd <folder>
$ git clone git@github.com:ferbaco86/enumerables-ruby.git

Author

👤 Fernando Bahamondes

🤝 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

  • Project inspired by Microverse Program.