Class: EarthTools::Height
- Inherits:
-
Object
- Object
- EarthTools::Height
- Defined in:
- lib/earth_tools/height.rb
Instance Attribute Summary collapse
-
#feet ⇒ Object
Returns the value of attribute feet.
-
#location ⇒ Object
Returns the value of attribute location.
-
#meters ⇒ Object
Returns the value of attribute meters.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Height
constructor
A new instance of Height.
Constructor Details
#initialize(attrs = {}) ⇒ Height
Returns a new instance of Height.
5 6 7 8 9 10 11 |
# File 'lib/earth_tools/height.rb', line 5 def initialize(attrs = {}) attrs ||= {} @version = attrs['version'] @location = EarthTools::Location.new(attrs['location']) @meters = attrs['meters'] @feet = attrs['feet'] end |
Instance Attribute Details
#feet ⇒ Object
Returns the value of attribute feet.
3 4 5 |
# File 'lib/earth_tools/height.rb', line 3 def feet @feet end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/earth_tools/height.rb', line 3 def location @location end |
#meters ⇒ Object
Returns the value of attribute meters.
3 4 5 |
# File 'lib/earth_tools/height.rb', line 3 def meters @meters end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/earth_tools/height.rb', line 3 def version @version end |