Sha256: 35fe20e323ef33dad321971cf16c85af01e62f3a4b22c97ae70ddc98e1b16ae7
Contents?: true
Size: 960 Bytes
Versions: 14
Compression:
Stored size: 960 Bytes
Contents
require 'geocoder/results/base' module Geocoder::Result class DbIpCom < Base def coordinates ['latitude', 'longitude'].map{ |coordinate_name| @data[coordinate_name] } end def city @data['city'] end def district @data['district'] end def state_code @data['stateProvCode'] end alias_method :state, :state_code def zip_code @data['zipCode'] end alias_method :postal_code, :zip_code def country_name @data['countryName'] end alias_method :country, :country_name def country_code @data['countryCode'] end def continent_name @data['continentName'] end alias_method :continent, :continent_name def continent_code @data['continentCode'] end def time_zone @data['timeZone'] end def gmt_offset @data['gmtOffset'] end def currency_code @data['currencyCode'] end end end
Version data entries
14 entries across 14 versions & 1 rubygems