Method: Interval#half_closed
- Defined in:
- lib/mega/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.
131 132 133 |
# File 'lib/mega/interval.rb', line 131 def half_closed(e=false) e ? Interval.new(@first, @last, true, false) : Interval.new(@first, @last, false, true) end |