Class: Geocoder::Result::DbIpCom
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::DbIpCom
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
Instance Method Details
#city ⇒ Object
10
11
12
|
# File 'lib/geocoder/results/db_ip_com.rb', line 10
def city
@data['city']
end
|
#continent_code ⇒ Object
42
43
44
|
# File 'lib/geocoder/results/db_ip_com.rb', line 42
def continent_code
@data['continentCode']
end
|
#continent_name ⇒ Object
Also known as:
continent
37
38
39
|
# File 'lib/geocoder/results/db_ip_com.rb', line 37
def continent_name
@data['continentName']
end
|
#coordinates ⇒ Object
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_code ⇒ Object
33
34
35
|
# File 'lib/geocoder/results/db_ip_com.rb', line 33
def country_code
@data['countryCode']
end
|
#country_name ⇒ Object
Also known as:
country
28
29
30
|
# File 'lib/geocoder/results/db_ip_com.rb', line 28
def country_name
@data['countryName']
end
|
#currency_code ⇒ Object
54
55
56
|
# File 'lib/geocoder/results/db_ip_com.rb', line 54
def currency_code
@data['currencyCode']
end
|
#district ⇒ Object
14
15
16
|
# File 'lib/geocoder/results/db_ip_com.rb', line 14
def district
@data['district']
end
|
#gmt_offset ⇒ Object
50
51
52
|
# File 'lib/geocoder/results/db_ip_com.rb', line 50
def gmt_offset
@data['gmtOffset']
end
|
#state_code ⇒ Object
Also known as:
state
18
19
20
|
# File 'lib/geocoder/results/db_ip_com.rb', line 18
def state_code
@data['stateProvCode']
end
|
#time_zone ⇒ Object
46
47
48
|
# File 'lib/geocoder/results/db_ip_com.rb', line 46
def time_zone
@data['timeZone']
end
|
#zip_code ⇒ Object
Also known as:
postal_code
23
24
25
|
# File 'lib/geocoder/results/db_ip_com.rb', line 23
def zip_code
@data['zipCode']
end
|