Class: Graticule::Geocoder::Mapbox::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/graticule/geocoder/mapbox.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Result

Returns a new instance of Result.



19
20
21
22
23
# File 'lib/graticule/geocoder/mapbox.rb', line 19

def initialize(attributes)
  self.precision = ::Graticule::Precision::Unknown
  self.lon = attributes["center"][0]
  self.lat = attributes["center"][1]
end

Instance Attribute Details

#latObject

Returns the value of attribute lat.



17
18
19
# File 'lib/graticule/geocoder/mapbox.rb', line 17

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



17
18
19
# File 'lib/graticule/geocoder/mapbox.rb', line 17

def lon
  @lon
end

#precisionObject

Returns the value of attribute precision.



17
18
19
# File 'lib/graticule/geocoder/mapbox.rb', line 17

def precision
  @precision
end