README.md in multi_range-0.0.2 vs README.md in multi_range-0.0.3

- old
+ new

@@ -51,25 +51,42 @@ ### Range-like interface #### each ```rb -MultiRange([1..3, 5..6]).each{|s| print s } -# => 12356 +MultiRange.new([1..3, 6, 8..9]).each{|s| print s } +# => 123689 ``` #### map ```rb -MultiRange([1..3, 5..6]).map{|s| s * 2 } -# => [2, 4, 6, 10, 12] +MultiRange.new([1..3, 6, 8..9]).map{|s| s * 2 } +# => [2, 4, 6, 12, 16, 18] ``` #### index_with ```rb -MultiRange([1..3, 5..6]).index_with(true) -# => { 1 => true, 2 => true, 3 => true, 5 => true, 6 => true } +MultiRange.new([1..3, 6, 8..9]).index_with(true) +# => { 1 => true, 2 => true, 3 => true, 6 => true, 8 => true, 9 => true } ``` +#### min +```rb +MultiRange.new([1..3, 6, 8..9]).min +# => 1 +``` + +#### max +```rb +MultiRange.new([1..3, 6, 8..9]).max +# => 9 +``` + +#### to_a +```rb +MultiRange.new([1..3, 6, 8..9]).to_a +# => [1, 2, 3, 6, 8, 9] +``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.