This project involves the recreation of the Ruby's major Enumerable methods found in its Enumerable module
Additional description about the project and its features.
The code base is pretty straight forward as it involves adding custom methods into the Ruby's enumerable module. Whats follows is a glimpse of the recreated methods and its Ruby's equivalent method. All the recreated methods are prefixed with "my_" to to avoid conflicts with the original Ruby methods.
Original Method | Recreated Method |
---|---|
each | my_each |
each_with_index | my_each_with_index |
map | my_inject |
all? | my_all? |
map | my_map |
any? | my_any? |
none? | My_none? |
count | my_count |
select | my_select |
- Ruby,
- Vscode
Clone this repo to get a local copy of the project locally. Modify this file to match your test cases
To get a local copy up and running follow these simple example steps.
- Ensure that you have ruby installed -- check out the official documention
- Text Editor: Visual Studio or sublime text recommended
- Rubocop for linting
- Check ruby version after installation.
- Open the project folder with vscode.
- Run bundle install to install all the missing project dependencies.
- gem install to install rubocop for linting purposes
- execute the main.rb file by running "ruby main.rb".
- Uncomment the test cases according to the method you want to test.
- Open vscode terminal
- You should see the output from the console.
๐ค Cyrus Kiprop
- Github: Cyrus-Kiprop
- Twitter: @kipropJS
- Linkedin: Cyrus Kiprop
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a โญ๏ธ if you like this project!
- eat() sleep() code() repeat()
This project is MIT licensed.