Class: Geocoder::Result::IpdataCo
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::IpdataCo
show all
- Defined in:
- lib/geocoder/results/ipdata_co.rb
Instance Attribute Summary
Attributes inherited from Base
#cache_hit, #data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#address, #coordinates, #initialize, #latitude, #longitude, #province, #province_code
Class Method Details
.response_attributes ⇒ Object
30
31
32
|
# File 'lib/geocoder/results/ipdata_co.rb', line 30
def self.response_attributes
%w[ip asn organisation currency currency_symbol calling_code flag time_zone is_eu]
end
|
Instance Method Details
#city ⇒ Object
6
7
8
|
# File 'lib/geocoder/results/ipdata_co.rb', line 6
def city
@data['city']
end
|
#country ⇒ Object
18
19
20
|
# File 'lib/geocoder/results/ipdata_co.rb', line 18
def country
@data['country_name']
end
|
#country_code ⇒ Object
22
23
24
|
# File 'lib/geocoder/results/ipdata_co.rb', line 22
def country_code
@data['country_code']
end
|
#postal_code ⇒ Object
26
27
28
|
# File 'lib/geocoder/results/ipdata_co.rb', line 26
def postal_code
@data['postal']
end
|
#state ⇒ Object
10
11
12
|
# File 'lib/geocoder/results/ipdata_co.rb', line 10
def state
@data['region']
end
|
#state_code ⇒ Object
14
15
16
|
# File 'lib/geocoder/results/ipdata_co.rb', line 14
def state_code
@data['region_code']
end
|