Class: Geocoord

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dimensionObject

Returns the value of attribute dimension.



16
17
18
# File 'lib/geohash.rb', line 16

def dimension
  @dimension
end

#eastObject

Returns the value of attribute east.



16
17
18
# File 'lib/geohash.rb', line 16

def east
  @east
end

#latitudeObject

Returns the value of attribute latitude.



16
17
18
# File 'lib/geohash.rb', line 16

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude.



16
17
18
# File 'lib/geohash.rb', line 16

def longitude
  @longitude
end

#northObject

Returns the value of attribute north.



16
17
18
# File 'lib/geohash.rb', line 16

def north
  @north
end

#southObject

Returns the value of attribute south.



16
17
18
# File 'lib/geohash.rb', line 16

def south
  @south
end

#westObject

Returns the value of attribute west.



16
17
18
# File 'lib/geohash.rb', line 16

def west
  @west
end