Method: Interval#half_closed
- Defined in:
- lib/standard/facets/interval.rb
#half_closed(e = false) ⇒ Object
Returns a new interval with either the first or the last sentinel exclusive. If the parameter is false, the deafult, then the first sentinel is excluded; if the parameter is true, the last sentinel is excluded.
99 100 101 |
# File 'lib/standard/facets/interval.rb', line 99 def half_closed(e=false) e ? Interval.new(@first, @last, true, false) : Interval.new(@first, @last, false, true) end |