Skip to content

Second assignment , enumerable methods on Microverse program. You learned about the Enumerable module that gets mixed into the Array and Hash classes (among others) and provides you with lots of handy iterator methods. To prove that there’s no magic to it, you’re going to rebuild those methods.

Notifications You must be signed in to change notification settings

bertil291utn/enumerabe-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enumerable Methods

In this section I learned about the Enumerable module that gets mixed into the Array and Hash classes (among others) and provides you with lots of handy iterator methods. To prove that there’s no magic to it, you’re going to rebuild those methods.

I had to use yield and the #call method to accomplished.

Built With

  • Ruby 2.6

Getting start

In order to start with the project:

  1. You need to have ruby environment installed. Click here for instructions
  2. Clone this repository 📘
  3. Run the algorithm file
    • In a terminal window write ruby [your_file_path]enumerable_method_asignment.rb

Testing

We are using RSpec testing tool to test all enumerable methods. Also some detailed documentation about this tool

Install

  • In a terminal window type gem install rspec
  • Once rspec install has finished, type rspec --init
  • You will see a folder spec and a file .rspec
  • Inside spec folder you'll see a spec_helper.rb file.

Run

We have already created a file called enumerable_spec.rb, if you want to create another one with the end [your file name]_spec.rb

  • Open ./spec/enumerable_spec.rb file
  • Open a terminal window and type rspec
  • If all test were passed you will see:

image

Else you'll see a red message, then check errors and fix them

Authors

👤 Bertil Tandayamo

This was a solo project, but to write testing part I got a hand from my colleague

👤 Bekhzod Akhrorov

🤝 Contributing

Contributions, issues and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

About

Second assignment , enumerable methods on Microverse program. You learned about the Enumerable module that gets mixed into the Array and Hash classes (among others) and provides you with lots of handy iterator methods. To prove that there’s no magic to it, you’re going to rebuild those methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages