Sha256: 2e3c27fddc23358d222965bb48ad921f8df1a03f9d443d9a71ff0c1dae750377
Contents?: true
Size: 581 Bytes
Versions: 46
Compression:
Stored size: 581 Bytes
Contents
require 'geocoder/results/base' module Geocoder::Result class GeocoderUs < Base def coordinates [@data[0].to_f, @data[1].to_f] end def address(format = :full) "#{street_address}, #{city}, #{state} #{postal_code}, #{country}".sub(/^[ ,]*/, "") end def street_address @data[2] end def city @data[3] end def state @data[4] end alias_method :state_code, :state def postal_code @data[5] end def country 'United States' end def country_code 'US' end end end
Version data entries
46 entries across 46 versions & 6 rubygems