Newer
Older
require 'geocoder/results/base'
module Geocoder::Result
class Mapbox < Base
def coordinates
end
alias_method :state_code, :state
def postal_code
alias_method :country_code, :country
[place_name, street, city, state, postal_code, country].compact.join(', ')
def context_part(name)
context.map { |c| c['text'] if c['id'] =~ Regexp.new(name) }.compact.first
end
Array(data['context'])