Skip to content
Snippets Groups Projects
Commit 3b429681 authored by sputnik82's avatar sputnik82
Browse files

There's an attribute accessor on data

parent 5d3744c2
No related branches found
No related tags found
No related merge requests found
...@@ -4,15 +4,15 @@ module Geocoder::Result ...@@ -4,15 +4,15 @@ module Geocoder::Result
class Mapbox < Base class Mapbox < Base
def coordinates def coordinates
@data["geometry"]["coordinates"].reverse.map(&:to_f) data["geometry"]["coordinates"].reverse.map(&:to_f)
end end
def place_name def place_name
@data['text'] data['text']
end end
def street def street
@data['properties']['address'] data['properties']['address']
end end
def city def city
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment