module Unbounded::RangeExtension

Extensions for the standard Ruby `Range` class.

Public Instance Methods

humanized() click to toggle source

@return [String] humanized string of the range

# File lib/unbounded/range_extension.rb, line 9
def humanized
  "#{self.begin} \u2013 #{self.end}"
end
unbounded() click to toggle source

Transform this into an Unbounded::Range. @return [Unbounded::Range]

# File lib/unbounded/range_extension.rb, line 15
def unbounded
  ::Unbounded::Range.new(self.min, self.max, exclude_end?)
end