The class DansUtils contains a single method to flatten an array with an undertermined number of nested arrays.
You may clone this repo and skip to test 5 if you so desire.
- Create a new test directory
- Create the two subdirectories: lib and spec
- Place the above files in their respective directories (see comment on first line of each file)
- Place the Gemfile the top level directory
- bundle install --path .bundle
$ bundle exec rspec
Which should produce:
3 examples, 0 failures
require './lib/dans_utils.rb'
utils = DansUtils.new utils.flatten([array of your choice])```