Class: Geocoord
- Inherits:
-
Object
- Object
- Geocoord
- Defined in:
- lib/geohash.rb
Instance Attribute Summary collapse
-
#dimension ⇒ Object
Returns the value of attribute dimension.
-
#east ⇒ Object
Returns the value of attribute east.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#north ⇒ Object
Returns the value of attribute north.
-
#south ⇒ Object
Returns the value of attribute south.
-
#west ⇒ Object
Returns the value of attribute west.
Instance Method Summary collapse
-
#initialize(geocoord) ⇒ Geocoord
constructor
A new instance of Geocoord.
Constructor Details
#initialize(geocoord) ⇒ Geocoord
Returns a new instance of Geocoord.
17 18 19 20 21 22 23 24 25 |
# File 'lib/geohash.rb', line 17 def initialize(geocoord) @latitude = geocoord['latitude'] @longitude = geocoord['longitude'] @north = geocoord['north'] @south = geocoord['south'] @east = geocoord['east'] @west = geocoord['west'] @dimension = Dimension.new(geocoord['dimension']) end |
Instance Attribute Details
#dimension ⇒ Object
Returns the value of attribute dimension.
16 17 18 |
# File 'lib/geohash.rb', line 16 def dimension @dimension end |
#east ⇒ Object
Returns the value of attribute east.
16 17 18 |
# File 'lib/geohash.rb', line 16 def east @east end |
#latitude ⇒ Object
Returns the value of attribute latitude.
16 17 18 |
# File 'lib/geohash.rb', line 16 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
16 17 18 |
# File 'lib/geohash.rb', line 16 def longitude @longitude end |
#north ⇒ Object
Returns the value of attribute north.
16 17 18 |
# File 'lib/geohash.rb', line 16 def north @north end |
#south ⇒ Object
Returns the value of attribute south.
16 17 18 |
# File 'lib/geohash.rb', line 16 def south @south end |
#west ⇒ Object
Returns the value of attribute west.
16 17 18 |
# File 'lib/geohash.rb', line 16 def west @west end |