- Fork & clone this repo. When you are done with the lab, make a pull request.
- Run
bundle install
to ensure you have Rspec properly installed. - Run rspec test by running
rspec spec/basic_enum_spec.rb
- Following the below rules, edit the
lib/enum/basic_enum.rb
to make the tests pass - Move on to the
spec/arrays_spec.rb
andspec/nested_spec.rb
tests
If you hit one that's too hard, you can skip and move onto the next one and come back.
In the rspec spec/basic_enum_spec.rb
there are links to documentation that maps almost directly to each problem.
- Do not assign any variables
- Do not modify the function declarations themselves; they already have the proper arguments and names needed there to make the tests pass.
- Do not use the
.each
method unless specifically told to do such - Do not user a
for
loop - Do not modify the tests
- Do not modify other code that is marked to not be modified
- Do not write any input/output using puts or gets
You may find the symbol to proc is also highly useful for writing shorter code. You may end up chaining many methods in each method to get the expected result.