Class: Barometer::Data::Distance
- Inherits:
-
ConvertableUnits
- Object
- SimpleDelegator
- ConvertableUnits
- Barometer::Data::Distance
- Defined in:
- lib/barometer/data/distance.rb
Instance Method Summary collapse
Methods inherited from ConvertableUnits
#<=>, #imperial, #initialize, #metric, #metric?, #nil?, #to_s
Constructor Details
This class inherits a constructor from Barometer::Data::ConvertableUnits
Instance Method Details
#km ⇒ Object
4 |
# File 'lib/barometer/data/distance.rb', line 4 def km; metric; end |
#m ⇒ Object
5 |
# File 'lib/barometer/data/distance.rb', line 5 def m; imperial; end |
#units ⇒ Object
7 8 9 |
# File 'lib/barometer/data/distance.rb', line 7 def units metric? ? 'km' : 'm' end |