Class: EarthTools::Height

Inherits:
Object
  • Object
show all
Defined in:
lib/earth_tools/height.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#feetObject

Returns the value of attribute feet.



3
4
5
# File 'lib/earth_tools/height.rb', line 3

def feet
  @feet
end

#locationObject

Returns the value of attribute location.



3
4
5
# File 'lib/earth_tools/height.rb', line 3

def location
  @location
end

#metersObject

Returns the value of attribute meters.



3
4
5
# File 'lib/earth_tools/height.rb', line 3

def meters
  @meters
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/earth_tools/height.rb', line 3

def version
  @version
end