/Enumerable-Methods

A set of enumerable methods re-created by the authors in the ruby programming language.

Primary LanguageRubyMIT LicenseMIT

Enumerable-Methods

A set of Ruby's standard enumerable methods re-created by the authors in the very same Ruby programming language.

screenshot screenshot screenshot screenshot screenshot screenshot

In the project we have replicated our own version of the following methods:

  • each,
  • each_with_index,
  • select,
  • all,
  • any,
  • none,
  • inject,
  • map

Built With

  • Ruby programming language

Getting Started

To run this program on your local machine, simply follow the steps below:

Prerequisites

  • Install the ruby programming language.

Usage

  • Clone this repo on your local machine by running git clone git@github.com:German-Cobian/Enumerable-Methods.git
  • cd into the Enumerable-Methods folder you just cloned.
  • run ruby enumerables.rb

Testing with Rspec

This project is tested with Rspec which is a computer domain-specific language (DSL) testing tool written in the Ruby programming language.

screenshot

How to get Rspec Running

  • Run the following command in the terminal: gem install rspec
  • This command installs Rspec on your computer. You ensure that Rspec is installed by running the following command to see the installed version: rspec --version
  • You should get output similar to the following:
    RSpec 3.10
      - rspec-core 3.10.1
      - rspec-expectations 3.10.1
      - rspec-mocks 3.10.2
      - rspec-support 3.10.2
    
  • The rspec gem comes packed with all you need to get started including the 5 gems listed above.
  • Navigate into the requisite folder by running cd AdvancedBuildingBlocks-Enumerables
  • Run the following command to initialize Rspec: rspec --init
  • This generates a /spec folder and a .rspec file at the root of your project.
  • Finally, to run the tests, simply run rspec

Authors

👤 Mih Julius Ndim

👤 German Cobian

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

📝 License

This project is MIT licensed.