Class: EarthTools::Result::Height
- Defined in:
- lib/earth_tools/result/height.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#feet ⇒ float
The height above sea level in feet See ).
-
#height ⇒ float
Returns height based on unit requested in configuration.
-
#meters ⇒ float
The height above sea level in meters See http://en.wikipedia.org/wiki/Meter.
Methods inherited from Base
#initialize, #latitude, #location, #longitude, #version
Constructor Details
This class inherits a constructor from EarthTools::Result::Base
Instance Method Details
#feet ⇒ float
The height above sea level in feet See ).
34 35 36 |
# File 'lib/earth_tools/result/height.rb', line 34 def feet @data['feet'].to_f end |
#height ⇒ float
Returns height based on unit requested in configuration
14 15 16 17 18 19 20 |
# File 'lib/earth_tools/result/height.rb', line 14 def height if EarthTools::Configuration.units == :metric meters else feet end end |
#meters ⇒ float
The height above sea level in meters See http://en.wikipedia.org/wiki/Meter.
26 27 28 |
# File 'lib/earth_tools/result/height.rb', line 26 def meters @data['meters'].to_f end |