Unbounded
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'unbounded'And then execute:
bundleOr install it yourself as:
gem install unboundedUsage
Create an unbounded range by passing nil as one of the end points:
normal_style = Unbounded::Range.new(0, nil) # => 0..INFINITY... Or using postgres-style ranges
postgres_style = Unbounded::Range.new('[0,100)') # => 0...100Alternatively, convert a vanilla range:
converted = (1..3).unbounded
converted.kind_of? Unbounded::Range # => trueContributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Todo
- invertable ranges (at least for numeric)