Class: Geocoder::Result::Ipregistry
- Inherits:
-
Base
- Object
- Base
- Geocoder::Result::Ipregistry
show all
- Defined in:
- lib/geocoder/results/ipregistry.rb
Instance Attribute Summary
Attributes inherited from Base
#cache_hit, #data
Instance Method Summary
collapse
Methods inherited from Base
#address, #latitude, #longitude, #province, #province_code
Constructor Details
Returns a new instance of Ipregistry.
6
7
8
9
10
|
# File 'lib/geocoder/results/ipregistry.rb', line 6
def initialize(data)
super
@data = flatten_hash(data)
end
|
Instance Method Details
#carrier_mcc ⇒ Object
72
73
74
|
# File 'lib/geocoder/results/ipregistry.rb', line 72
def carrier_mcc
@data["carrier_mcc"]
end
|
#carrier_mnc ⇒ Object
76
77
78
|
# File 'lib/geocoder/results/ipregistry.rb', line 76
def carrier_mnc
@data["carrier_mnc"]
end
|
#carrier_name ⇒ Object
68
69
70
|
# File 'lib/geocoder/results/ipregistry.rb', line 68
def carrier_name
@data["carrier_name"]
end
|
#city ⇒ Object
30
31
32
|
# File 'lib/geocoder/results/ipregistry.rb', line 30
def city
@data['location_city']
end
|
#connection_asn ⇒ Object
80
81
82
|
# File 'lib/geocoder/results/ipregistry.rb', line 80
def connection_asn
@data["connection_asn"]
end
|
#connection_domain ⇒ Object
84
85
86
|
# File 'lib/geocoder/results/ipregistry.rb', line 84
def connection_domain
@data["connection_domain"]
end
|
#connection_organization ⇒ Object
88
89
90
|
# File 'lib/geocoder/results/ipregistry.rb', line 88
def connection_organization
@data["connection_organization"]
end
|
#connection_type ⇒ Object
92
93
94
|
# File 'lib/geocoder/results/ipregistry.rb', line 92
def connection_type
@data["connection_type"]
end
|
#coordinates ⇒ Object
12
13
14
|
# File 'lib/geocoder/results/ipregistry.rb', line 12
def coordinates
[@data['location_latitude'], @data['location_longitude']]
end
|
#country ⇒ Object
34
35
36
|
# File 'lib/geocoder/results/ipregistry.rb', line 34
def country
@data['location_country_name']
end
|
#country_code ⇒ Object
38
39
40
|
# File 'lib/geocoder/results/ipregistry.rb', line 38
def country_code
@data['location_country_code']
end
|
#currency_code ⇒ Object
96
97
98
|
# File 'lib/geocoder/results/ipregistry.rb', line 96
def currency_code
@data["currency_code"]
end
|
116
117
118
|
# File 'lib/geocoder/results/ipregistry.rb', line 116
def currency_format_negative_prefix
@data["currency_format_negative_prefix"]
end
|
120
121
122
|
# File 'lib/geocoder/results/ipregistry.rb', line 120
def currency_format_negative_suffix
@data["currency_format_negative_suffix"]
end
|
124
125
126
|
# File 'lib/geocoder/results/ipregistry.rb', line 124
def currency_format_positive_prefix
@data["currency_format_positive_prefix"]
end
|
128
129
130
|
# File 'lib/geocoder/results/ipregistry.rb', line 128
def currency_format_positive_suffix
@data["currency_format_positive_suffix"]
end
|
#currency_name ⇒ Object
100
101
102
|
# File 'lib/geocoder/results/ipregistry.rb', line 100
def currency_name
@data["currency_name"]
end
|
#currency_plural ⇒ Object
104
105
106
|
# File 'lib/geocoder/results/ipregistry.rb', line 104
def currency_plural
@data["currency_plural"]
end
|
#currency_symbol ⇒ Object
108
109
110
|
# File 'lib/geocoder/results/ipregistry.rb', line 108
def currency_symbol
@data["currency_symbol"]
end
|
#currency_symbol_native ⇒ Object
112
113
114
|
# File 'lib/geocoder/results/ipregistry.rb', line 112
def currency_symbol_native
@data["currency_symbol_native"]
end
|
#hostname ⇒ Object
64
65
66
|
# File 'lib/geocoder/results/ipregistry.rb', line 64
def hostname
@data["hostname"]
end
|
#ip ⇒ Object
methods for fields specific to Ipregistry
56
57
58
|
# File 'lib/geocoder/results/ipregistry.rb', line 56
def ip
@data["ip"]
end
|
#location_city ⇒ Object
212
213
214
|
# File 'lib/geocoder/results/ipregistry.rb', line 212
def location_city
@data["location_city"]
end
|
#location_continent_code ⇒ Object
132
133
134
|
# File 'lib/geocoder/results/ipregistry.rb', line 132
def location_continent_code
@data["location_continent_code"]
end
|
#location_continent_name ⇒ Object
136
137
138
|
# File 'lib/geocoder/results/ipregistry.rb', line 136
def location_continent_name
@data["location_continent_name"]
end
|
#location_country_area ⇒ Object
140
141
142
|
# File 'lib/geocoder/results/ipregistry.rb', line 140
def location_country_area
@data["location_country_area"]
end
|
#location_country_borders ⇒ Object
144
145
146
|
# File 'lib/geocoder/results/ipregistry.rb', line 144
def location_country_borders
@data["location_country_borders"]
end
|
#location_country_calling_code ⇒ Object
148
149
150
|
# File 'lib/geocoder/results/ipregistry.rb', line 148
def location_country_calling_code
@data["location_country_calling_code"]
end
|
#location_country_capital ⇒ Object
152
153
154
|
# File 'lib/geocoder/results/ipregistry.rb', line 152
def location_country_capital
@data["location_country_capital"]
end
|
#location_country_code ⇒ Object
156
157
158
|
# File 'lib/geocoder/results/ipregistry.rb', line 156
def location_country_code
@data["location_country_code"]
end
|
#location_country_flag_emoji ⇒ Object
172
173
174
|
# File 'lib/geocoder/results/ipregistry.rb', line 172
def location_country_flag_emoji
@data["location_country_flag_emoji"]
end
|
#location_country_flag_emoji_unicode ⇒ Object
176
177
178
|
# File 'lib/geocoder/results/ipregistry.rb', line 176
def location_country_flag_emoji_unicode
@data["location_country_flag_emoji_unicode"]
end
|
#location_country_flag_emojitwo ⇒ Object
180
181
182
|
# File 'lib/geocoder/results/ipregistry.rb', line 180
def location_country_flag_emojitwo
@data["location_country_flag_emojitwo"]
end
|
#location_country_flag_noto ⇒ Object
184
185
186
|
# File 'lib/geocoder/results/ipregistry.rb', line 184
def location_country_flag_noto
@data["location_country_flag_noto"]
end
|
#location_country_flag_twemoji ⇒ Object
188
189
190
|
# File 'lib/geocoder/results/ipregistry.rb', line 188
def location_country_flag_twemoji
@data["location_country_flag_twemoji"]
end
|
192
193
194
|
# File 'lib/geocoder/results/ipregistry.rb', line 192
def location_country_flag_wikimedia
@data["location_country_flag_wikimedia"]
end
|
#location_country_languages ⇒ Object
196
197
198
|
# File 'lib/geocoder/results/ipregistry.rb', line 196
def location_country_languages
@data["location_country_languages"]
end
|
#location_country_name ⇒ Object
160
161
162
|
# File 'lib/geocoder/results/ipregistry.rb', line 160
def location_country_name
@data["location_country_name"]
end
|
#location_country_population ⇒ Object
164
165
166
|
# File 'lib/geocoder/results/ipregistry.rb', line 164
def location_country_population
@data["location_country_population"]
end
|
#location_country_population_density ⇒ Object
168
169
170
|
# File 'lib/geocoder/results/ipregistry.rb', line 168
def location_country_population_density
@data["location_country_population_density"]
end
|
#location_country_tld ⇒ Object
200
201
202
|
# File 'lib/geocoder/results/ipregistry.rb', line 200
def location_country_tld
@data["location_country_tld"]
end
|
#location_in_eu ⇒ Object
240
241
242
|
# File 'lib/geocoder/results/ipregistry.rb', line 240
def location_in_eu
@data["location_in_eu"]
end
|
#location_language_code ⇒ Object
228
229
230
|
# File 'lib/geocoder/results/ipregistry.rb', line 228
def location_language_code
@data["location_language_code"]
end
|
#location_language_name ⇒ Object
232
233
234
|
# File 'lib/geocoder/results/ipregistry.rb', line 232
def location_language_name
@data["location_language_name"]
end
|
#location_language_native ⇒ Object
236
237
238
|
# File 'lib/geocoder/results/ipregistry.rb', line 236
def location_language_native
@data["location_language_native"]
end
|
#location_latitude ⇒ Object
220
221
222
|
# File 'lib/geocoder/results/ipregistry.rb', line 220
def location_latitude
@data["location_latitude"]
end
|
#location_longitude ⇒ Object
224
225
226
|
# File 'lib/geocoder/results/ipregistry.rb', line 224
def location_longitude
@data["location_longitude"]
end
|
#location_postal ⇒ Object
216
217
218
|
# File 'lib/geocoder/results/ipregistry.rb', line 216
def location_postal
@data["location_postal"]
end
|
#location_region_code ⇒ Object
204
205
206
|
# File 'lib/geocoder/results/ipregistry.rb', line 204
def location_region_code
@data["location_region_code"]
end
|
#location_region_name ⇒ Object
208
209
210
|
# File 'lib/geocoder/results/ipregistry.rb', line 208
def location_region_name
@data["location_region_name"]
end
|
#postal_code ⇒ Object
42
43
44
|
# File 'lib/geocoder/results/ipregistry.rb', line 42
def postal_code
@data['location_postal']
end
|
#security_is_abuser ⇒ Object
268
269
270
|
# File 'lib/geocoder/results/ipregistry.rb', line 268
def security_is_abuser
@data["security_is_abuser"]
end
|
#security_is_anonymous ⇒ Object
264
265
266
|
# File 'lib/geocoder/results/ipregistry.rb', line 264
def security_is_anonymous
@data["security_is_anonymous"]
end
|
#security_is_attacker ⇒ Object
272
273
274
|
# File 'lib/geocoder/results/ipregistry.rb', line 272
def security_is_attacker
@data["security_is_attacker"]
end
|
#security_is_bogon ⇒ Object
244
245
246
|
# File 'lib/geocoder/results/ipregistry.rb', line 244
def security_is_bogon
@data["security_is_bogon"]
end
|
#security_is_cloud_provider ⇒ Object
248
249
250
|
# File 'lib/geocoder/results/ipregistry.rb', line 248
def security_is_cloud_provider
@data["security_is_cloud_provider"]
end
|
#security_is_proxy ⇒ Object
260
261
262
|
# File 'lib/geocoder/results/ipregistry.rb', line 260
def security_is_proxy
@data["security_is_proxy"]
end
|
#security_is_threat ⇒ Object
276
277
278
|
# File 'lib/geocoder/results/ipregistry.rb', line 276
def security_is_threat
@data["security_is_threat"]
end
|
#security_is_tor ⇒ Object
252
253
254
|
# File 'lib/geocoder/results/ipregistry.rb', line 252
def security_is_tor
@data["security_is_tor"]
end
|
#security_is_tor_exit ⇒ Object
256
257
258
|
# File 'lib/geocoder/results/ipregistry.rb', line 256
def security_is_tor_exit
@data["security_is_tor_exit"]
end
|
#state ⇒ Object
46
47
48
|
# File 'lib/geocoder/results/ipregistry.rb', line 46
def state
@data['location_region_name']
end
|
#state_code ⇒ Object
50
51
52
|
# File 'lib/geocoder/results/ipregistry.rb', line 50
def state_code
@data['location_region_code']
end
|
#time_zone_abbreviation ⇒ Object
284
285
286
|
# File 'lib/geocoder/results/ipregistry.rb', line 284
def time_zone_abbreviation
@data["time_zone_abbreviation"]
end
|
#time_zone_current_time ⇒ Object
288
289
290
|
# File 'lib/geocoder/results/ipregistry.rb', line 288
def time_zone_current_time
@data["time_zone_current_time"]
end
|
#time_zone_id ⇒ Object
280
281
282
|
# File 'lib/geocoder/results/ipregistry.rb', line 280
def time_zone_id
@data["time_zone_id"]
end
|
#time_zone_in_daylight_saving ⇒ Object
300
301
302
|
# File 'lib/geocoder/results/ipregistry.rb', line 300
def time_zone_in_daylight_saving
@data["time_zone_in_daylight_saving"]
end
|
#time_zone_name ⇒ Object
292
293
294
|
# File 'lib/geocoder/results/ipregistry.rb', line 292
def time_zone_name
@data["time_zone_name"]
end
|
#time_zone_offset ⇒ Object
296
297
298
|
# File 'lib/geocoder/results/ipregistry.rb', line 296
def time_zone_offset
@data["time_zone_offset"]
end
|
#type ⇒ Object
60
61
62
|
# File 'lib/geocoder/results/ipregistry.rb', line 60
def type
@data["type"]
end
|