Skip to content

my version of Ruby’s enumerable methods. Custom implementation of the Enumerable module methods that provides lots of handy iterator methods

Notifications You must be signed in to change notification settings

Mikearaya/enumerable-methods

Repository files navigation

Ruby Enumerable Methods Run on Repl.it

my version of Ruby’s enumerable methods. Custom implementation of the Enumerable module method, methods that provides lots of handy iteration capabilities

Getting Started

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

  • Clone or download this repository to your local workstation.

Prerequisites

Since all the code is written using ruby Ruby Runtime >= 1.9 is required to interpret the code. if you don't have ruby runtime installed on your computer follow the instruction for your specific operating system on the official installation guide

Usage

After you have downloaded and have a local copy on your computer, open the folder using your terminal/commandline window and run

ruby iterators.rb

Contents

  1. #my_each method Implementation of #each
  2. #my_each_with_index method Implementation of #each_with_index
  3. #my_select (#my_find_all, #my_filter) method Implementation of #select, find_all, filter
  4. #my_all? method Implementation of #all?
  5. #my_any? method Implementation of #any?
  6. #my_none? method Implementation of #none?
  7. #my_count method Implementation of #count
  8. #my_map method Customize Implementation of #map. this method will now take Proc as an argument unlike the original one. if both Proc and block is given Proc will have precedence
  9. #my_inject (#my_reduce) method Implementation of #inject, (#reduce)
  10. #multiply_els method New method only created for testing my_inject method

Authors

👤 Mikael Araya

🤝 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!

📝 License

This project is MIT licensed.

About

my version of Ruby’s enumerable methods. Custom implementation of the Enumerable module methods that provides lots of handy iterator methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages