Class: EarthTools::Location
- Inherits:
-
Object
- Object
- EarthTools::Location
- Defined in:
- lib/earth_tools/location.rb
Instance Attribute Summary collapse
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Location
constructor
A new instance of Location.
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
#latitude ⇒ Object
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/earth_tools/location.rb', line 3 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/earth_tools/location.rb', line 3 def longitude @longitude end |