Class: LongDurationRange
- Inherits:
-
DurationRange
- Object
- DelegateDecorator
- DurationRange
- LongDurationRange
- Defined in:
- lib/timespan/core_ext/range.rb
Instance Attribute Summary
Attributes inherited from DurationRange
Class Method Summary collapse
Instance Method Summary collapse
- #allowed_units ⇒ Object
-
#length ⇒ Object
def <=> other_dur_range super end.
Methods inherited from DurationRange
#<=>, allowed_unit?, #allowed_unit?, #between?, demongoize, evolve, #initialize, #mongoize, mongoize, #time, #to_hash, #to_s, #to_str
Constructor Details
This class inherits a constructor from DurationRange
Class Method Details
.allowed_units ⇒ Object
197 198 199 |
# File 'lib/timespan/core_ext/range.rb', line 197 def self.allowed_units [:days, :weeks, :months, :years] end |
Instance Method Details
#allowed_units ⇒ Object
201 202 203 |
# File 'lib/timespan/core_ext/range.rb', line 201 def allowed_units LongDurationRange.allowed_units end |
#length ⇒ Object
def <=> other_dur_range
super
end
193 194 195 |
# File 'lib/timespan/core_ext/range.rb', line 193 def length :long end |