Class: UniqSysOmega::Tariffs::SortableRange

Inherits:
Range
  • Object
show all
Defined in:
lib/repeating_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Range

#intersection, #subtract

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



6
7
8
# File 'lib/repeating_filter.rb', line 6

def filter
  @filter
end

Instance Method Details

#<=>(other) ⇒ Object



8
9
10
# File 'lib/repeating_filter.rb', line 8

def <=>(other)
  self.begin <=> other.begin
end

#as_rangeObject



12
13
14
# File 'lib/repeating_filter.rb', line 12

def as_range
  Range.new(self.begin, self.end, self.exclude_end?)
end