Class: Graticule::Geocoder::Mapbox::Result
- Inherits:
-
Object
- Object
- Graticule::Geocoder::Mapbox::Result
- Defined in:
- lib/graticule/geocoder/mapbox.rb
Instance Attribute Summary collapse
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#precision ⇒ Object
Returns the value of attribute precision.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Result
constructor
A new instance of Result.
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
#lat ⇒ Object
Returns the value of attribute lat.
17 18 19 |
# File 'lib/graticule/geocoder/mapbox.rb', line 17 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
17 18 19 |
# File 'lib/graticule/geocoder/mapbox.rb', line 17 def lon @lon end |
#precision ⇒ Object
Returns the value of attribute precision.
17 18 19 |
# File 'lib/graticule/geocoder/mapbox.rb', line 17 def precision @precision end |