module BetterRanges::RangeOperators

Public Instance Methods

&(other) click to toggle source
# File lib/better_ranges/range_operators.rb, line 13
def &(other)
  SparseRange.new(self) & other
end
Also aliased as: intersect
+(other)
Alias for: |
-(other) click to toggle source
# File lib/better_ranges/range_operators.rb, line 9
def -(other)
  SparseRange.new(self) - other
end
Also aliased as: minus, difference
difference(other)
Alias for: -
intersect(other)
Alias for: &
minus(other)
Alias for: -
union(other)
Alias for: |
|(other) click to toggle source
# File lib/better_ranges/range_operators.rb, line 5
def |(other)
  SparseRange.new(self, *other)
end
Also aliased as: +, union