class Yap::ExtendedRange
Extends Range by StringInfinity
.
Public Instance Methods
begin()
click to toggle source
Calls superclass method
# File lib/yap/extended_range.rb, line 6 def begin handle_infinity super end
end()
click to toggle source
Calls superclass method
# File lib/yap/extended_range.rb, line 10 def end handle_infinity super end
handle_infinity(value)
click to toggle source
# File lib/yap/extended_range.rb, line 14 def handle_infinity(value) return value unless value.is_a? StringInfinity if value.is_a?(StringInfinityNegative) -Float::INFINITY else Float::INFINITY end end