Class: ShortDurationRange
- Inherits:
-
DurationRange
- Object
- DelegateDecorator
- DurationRange
- ShortDurationRange
- 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
217 218 219 |
# File 'lib/timespan/core_ext/range.rb', line 217 def self.allowed_units [:seconds, :minutes, :hours] end |
Instance Method Details
#allowed_units ⇒ Object
221 222 223 |
# File 'lib/timespan/core_ext/range.rb', line 221 def allowed_units ShortDurationRange.allowed_units end |
#length ⇒ Object
def <=> other_dur_range
super
end
213 214 215 |
# File 'lib/timespan/core_ext/range.rb', line 213 def length :short end |