Class: Geocoder::Result::DbIpCom

Inherits:
Base
  • Object
show all
Defined in:
lib/geocoder/results/db_ip_com.rb

Instance Attribute Summary

Attributes inherited from Base

#cache_hit, #data

Instance Method Summary collapse

Methods inherited from Base

#address, #initialize, #latitude, #longitude, #province, #province_code

Constructor Details

This class inherits a constructor from Geocoder::Result::Base

Instance Method Details

#cityObject



10
11
12
# File 'lib/geocoder/results/db_ip_com.rb', line 10

def city
  @data['city']
end

#continent_codeObject



42
43
44
# File 'lib/geocoder/results/db_ip_com.rb', line 42

def continent_code
  @data['continentCode']
end

#continent_nameObject Also known as: continent



37
38
39
# File 'lib/geocoder/results/db_ip_com.rb', line 37

def continent_name
  @data['continentName']
end

#coordinatesObject



6
7
8
# File 'lib/geocoder/results/db_ip_com.rb', line 6

def coordinates
  ['latitude', 'longitude'].map{ |coordinate_name| @data[coordinate_name] }
end

#country_codeObject



33
34
35
# File 'lib/geocoder/results/db_ip_com.rb', line 33

def country_code
  @data['countryCode']
end

#country_nameObject Also known as: country



28
29
30
# File 'lib/geocoder/results/db_ip_com.rb', line 28

def country_name
  @data['countryName']
end

#currency_codeObject



54
55
56
# File 'lib/geocoder/results/db_ip_com.rb', line 54

def currency_code
  @data['currencyCode']
end

#districtObject



14
15
16
# File 'lib/geocoder/results/db_ip_com.rb', line 14

def district
  @data['district']
end

#gmt_offsetObject



50
51
52
# File 'lib/geocoder/results/db_ip_com.rb', line 50

def gmt_offset
  @data['gmtOffset']
end

#state_codeObject Also known as: state



18
19
20
# File 'lib/geocoder/results/db_ip_com.rb', line 18

def state_code
  @data['stateProvCode']
end

#time_zoneObject



46
47
48
# File 'lib/geocoder/results/db_ip_com.rb', line 46

def time_zone
  @data['timeZone']
end

#zip_codeObject Also known as: postal_code



23
24
25
# File 'lib/geocoder/results/db_ip_com.rb', line 23

def zip_code
  @data['zipCode']
end