Class: ShortDurationRange

Inherits:
DurationRange show all
Defined in:
lib/timespan/core_ext/range.rb

Instance Attribute Summary

Attributes inherited from DurationRange

#range, #unit

Class Method Summary collapse

Instance Method Summary collapse

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_unitsObject



205
206
207
# File 'lib/timespan/core_ext/range.rb', line 205

def self.allowed_units
  [:seconds, :minutes, :hours]
end

Instance Method Details

#allowed_unitsObject



209
210
211
# File 'lib/timespan/core_ext/range.rb', line 209

def allowed_units
  ShortDurationRange.allowed_units
end

#lengthObject



201
202
203
# File 'lib/timespan/core_ext/range.rb', line 201

def length
  :short
end