Class: EarthTools::Location

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Location

Returns a new instance of Location.



5
6
7
8
9
# File 'lib/earth_tools/location.rb', line 5

def initialize(attrs = {})
  attrs ||= {}
  @latitude = attrs['latitude']
  @longitude = attrs['longitude']
end

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude.



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

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



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

def longitude
  @longitude
end