Skip to content

This is a project that implements my own version of Ruby's enumerable methods.

License

Notifications You must be signed in to change notification settings

ebeagusamuel/advanced_building_blocks_enumerables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Enumerable Methods

This is my custom implemtation of some Ruby's enumerable methods.

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

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

Author

👤 Ebeagu Samuel

🤝 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

This is a project that implements my own version of Ruby's enumerable methods.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages