Skip to content

This application is a demonstration for implementation of built in ruby enumerators with user custom codes.

Notifications You must be signed in to change notification settings

tta2yta/custom_ruby_enumerables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Custom Enumerable Methods

View Code Github Issues GitHub Pull Requests

Content

About   |    Methods   |    Installing   |    Built with   |    Live Demo   |    Author

About

This project is a microverse collaborative project which is part of the requirements of the microverse technical curriculum in the Ruby section. This project consist of different ruby enumerable methods that emulate Ruby's in-built enumerable methods

Methods

The custom methods created are listed below:

  • my_each
  • my_each_with_index
  • my_select
  • my_all?
  • my_any
  • my_none?
  • my_count
  • my_map
  • my_inject
  • 🔧 Built with

    • Ruby

    🔴 Live Demo

    Run on Repl.it

    Getting Started

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

    $ cd <Enumerables>
    
    $ git clone https://github.com/tta2yta/custom_ruby_enumerables.git
    

    To run the code:

    $ ruby custom_enumerables.rb
    

    🔨 Testing

    To run the tests described for each method:

    • change directory to the root of the project (cd into the project folder)
    • from terminal run the command rspec
    • to run a specific test rspec ./spec/my_enumerables_spec.rb:104 (here 104 is the line number of the method)
    • result should be similar to:

    ✒️ Author

    👤 Tedrso Tesfay

    👤 Sohaib Asif

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

    👏 Acknowledgements

    [Ruby enumerable documentation here:] https://ruby-doc.org/core-2.7.1/Enumerable.html

    About

    This application is a demonstration for implementation of built in ruby enumerators with user custom codes.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages