Class: Geocoder::Result::Ipregistry

Inherits:
Base
  • Object
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, #coordinates, #province, #province_code

Constructor Details

#initialize(data) ⇒ Ipregistry

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_mccObject


76
77
78
# File 'lib/geocoder/results/ipregistry.rb', line 76

def carrier_mcc
  @data["carrier_mcc"]
end

#carrier_mncObject


80
81
82
# File 'lib/geocoder/results/ipregistry.rb', line 80

def carrier_mnc
  @data["carrier_mnc"]
end

#carrier_nameObject


72
73
74
# File 'lib/geocoder/results/ipregistry.rb', line 72

def carrier_name
  @data["carrier_name"]
end

#cityObject


26
27
28
# File 'lib/geocoder/results/ipregistry.rb', line 26

def city
  @data['location_city']
end

#connection_asnObject


84
85
86
# File 'lib/geocoder/results/ipregistry.rb', line 84

def connection_asn
  @data["connection_asn"]
end

#connection_domainObject


88
89
90
# File 'lib/geocoder/results/ipregistry.rb', line 88

def connection_domain
  @data["connection_domain"]
end

#connection_organizationObject


92
93
94
# File 'lib/geocoder/results/ipregistry.rb', line 92

def connection_organization
  @data["connection_organization"]
end

#connection_typeObject


96
97
98
# File 'lib/geocoder/results/ipregistry.rb', line 96

def connection_type
  @data["connection_type"]
end

#countryObject


30
31
32
# File 'lib/geocoder/results/ipregistry.rb', line 30

def country
  @data['location_country_name']
end

#country_codeObject


34
35
36
# File 'lib/geocoder/results/ipregistry.rb', line 34

def country_code
  @data['location_country_code']
end

#currency_codeObject


100
101
102
# File 'lib/geocoder/results/ipregistry.rb', line 100

def currency_code
  @data["currency_code"]
end

#currency_format_negative_prefixObject


120
121
122
# File 'lib/geocoder/results/ipregistry.rb', line 120

def currency_format_negative_prefix
  @data["currency_format_negative_prefix"]
end

#currency_format_negative_suffixObject


124
125
126
# File 'lib/geocoder/results/ipregistry.rb', line 124

def currency_format_negative_suffix
  @data["currency_format_negative_suffix"]
end

#currency_format_positive_prefixObject


128
129
130
# File 'lib/geocoder/results/ipregistry.rb', line 128

def currency_format_positive_prefix
  @data["currency_format_positive_prefix"]
end

#currency_format_positive_suffixObject


132
133
134
# File 'lib/geocoder/results/ipregistry.rb', line 132

def currency_format_positive_suffix
  @data["currency_format_positive_suffix"]
end

#currency_nameObject


104
105
106
# File 'lib/geocoder/results/ipregistry.rb', line 104

def currency_name
  @data["currency_name"]
end

#currency_pluralObject


108
109
110
# File 'lib/geocoder/results/ipregistry.rb', line 108

def currency_plural
  @data["currency_plural"]
end

#currency_symbolObject


112
113
114
# File 'lib/geocoder/results/ipregistry.rb', line 112

def currency_symbol
  @data["currency_symbol"]
end

#currency_symbol_nativeObject


116
117
118
# File 'lib/geocoder/results/ipregistry.rb', line 116

def currency_symbol_native
  @data["currency_symbol_native"]
end

#hostnameObject


68
69
70
# File 'lib/geocoder/results/ipregistry.rb', line 68

def hostname
  @data["hostname"]
end

#ipObject

methods for fields specific to Ipregistry


60
61
62
# File 'lib/geocoder/results/ipregistry.rb', line 60

def ip
  @data["ip"]
end

#latitudeObject


38
39
40
# File 'lib/geocoder/results/ipregistry.rb', line 38

def latitude
  @data['location_latitude']
end

#location_cityObject


216
217
218
# File 'lib/geocoder/results/ipregistry.rb', line 216

def location_city
  @data["location_city"]
end

#location_continent_codeObject


136
137
138
# File 'lib/geocoder/results/ipregistry.rb', line 136

def location_continent_code
  @data["location_continent_code"]
end

#location_continent_nameObject


140
141
142
# File 'lib/geocoder/results/ipregistry.rb', line 140

def location_continent_name
  @data["location_continent_name"]
end

#location_country_areaObject


144
145
146
# File 'lib/geocoder/results/ipregistry.rb', line 144

def location_country_area
  @data["location_country_area"]
end

#location_country_bordersObject


148
149
150
# File 'lib/geocoder/results/ipregistry.rb', line 148

def location_country_borders
  @data["location_country_borders"]
end

#location_country_calling_codeObject


152
153
154
# File 'lib/geocoder/results/ipregistry.rb', line 152

def location_country_calling_code
  @data["location_country_calling_code"]
end

#location_country_capitalObject


156
157
158
# File 'lib/geocoder/results/ipregistry.rb', line 156

def location_country_capital
  @data["location_country_capital"]
end

#location_country_codeObject


160
161
162
# File 'lib/geocoder/results/ipregistry.rb', line 160

def location_country_code
  @data["location_country_code"]
end

#location_country_flag_emojiObject


176
177
178
# File 'lib/geocoder/results/ipregistry.rb', line 176

def location_country_flag_emoji
  @data["location_country_flag_emoji"]
end

#location_country_flag_emoji_unicodeObject


180
181
182
# File 'lib/geocoder/results/ipregistry.rb', line 180

def location_country_flag_emoji_unicode
  @data["location_country_flag_emoji_unicode"]
end

#location_country_flag_emojitwoObject


184
185
186
# File 'lib/geocoder/results/ipregistry.rb', line 184

def location_country_flag_emojitwo
  @data["location_country_flag_emojitwo"]
end

#location_country_flag_notoObject


188
189
190
# File 'lib/geocoder/results/ipregistry.rb', line 188

def location_country_flag_noto
  @data["location_country_flag_noto"]
end

#location_country_flag_twemojiObject


192
193
194
# File 'lib/geocoder/results/ipregistry.rb', line 192

def location_country_flag_twemoji
  @data["location_country_flag_twemoji"]
end

#location_country_flag_wikimediaObject


196
197
198
# File 'lib/geocoder/results/ipregistry.rb', line 196

def location_country_flag_wikimedia
  @data["location_country_flag_wikimedia"]
end

#location_country_languagesObject


200
201
202
# File 'lib/geocoder/results/ipregistry.rb', line 200

def location_country_languages
  @data["location_country_languages"]
end

#location_country_nameObject


164
165
166
# File 'lib/geocoder/results/ipregistry.rb', line 164

def location_country_name
  @data["location_country_name"]
end

#location_country_populationObject


168
169
170
# File 'lib/geocoder/results/ipregistry.rb', line 168

def location_country_population
  @data["location_country_population"]
end

#location_country_population_densityObject


172
173
174
# File 'lib/geocoder/results/ipregistry.rb', line 172

def location_country_population_density
  @data["location_country_population_density"]
end

#location_country_tldObject


204
205
206
# File 'lib/geocoder/results/ipregistry.rb', line 204

def location_country_tld
  @data["location_country_tld"]
end

#location_in_euObject


244
245
246
# File 'lib/geocoder/results/ipregistry.rb', line 244

def location_in_eu
  @data["location_in_eu"]
end

#location_language_codeObject


232
233
234
# File 'lib/geocoder/results/ipregistry.rb', line 232

def location_language_code
  @data["location_language_code"]
end

#location_language_nameObject


236
237
238
# File 'lib/geocoder/results/ipregistry.rb', line 236

def location_language_name
  @data["location_language_name"]
end

#location_language_nativeObject


240
241
242
# File 'lib/geocoder/results/ipregistry.rb', line 240

def location_language_native
  @data["location_language_native"]
end

#location_latitudeObject


224
225
226
# File 'lib/geocoder/results/ipregistry.rb', line 224

def location_latitude
  @data["location_latitude"]
end

#location_longitudeObject


228
229
230
# File 'lib/geocoder/results/ipregistry.rb', line 228

def location_longitude
  @data["location_longitude"]
end

#location_postalObject


220
221
222
# File 'lib/geocoder/results/ipregistry.rb', line 220

def location_postal
  @data["location_postal"]
end

#location_region_codeObject


208
209
210
# File 'lib/geocoder/results/ipregistry.rb', line 208

def location_region_code
  @data["location_region_code"]
end

#location_region_nameObject


212
213
214
# File 'lib/geocoder/results/ipregistry.rb', line 212

def location_region_name
  @data["location_region_name"]
end

#longitudeObject


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

def longitude
  @data['location_longitude']
end

#postal_codeObject


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

def postal_code
  @data['location_postal']
end

#security_is_abuserObject


272
273
274
# File 'lib/geocoder/results/ipregistry.rb', line 272

def security_is_abuser
  @data["security_is_abuser"]
end

#security_is_anonymousObject


268
269
270
# File 'lib/geocoder/results/ipregistry.rb', line 268

def security_is_anonymous
  @data["security_is_anonymous"]
end

#security_is_attackerObject


276
277
278
# File 'lib/geocoder/results/ipregistry.rb', line 276

def security_is_attacker
  @data["security_is_attacker"]
end

#security_is_bogonObject


248
249
250
# File 'lib/geocoder/results/ipregistry.rb', line 248

def security_is_bogon
  @data["security_is_bogon"]
end

#security_is_cloud_providerObject


252
253
254
# File 'lib/geocoder/results/ipregistry.rb', line 252

def security_is_cloud_provider
  @data["security_is_cloud_provider"]
end

#security_is_proxyObject


264
265
266
# File 'lib/geocoder/results/ipregistry.rb', line 264

def security_is_proxy
  @data["security_is_proxy"]
end

#security_is_threatObject


280
281
282
# File 'lib/geocoder/results/ipregistry.rb', line 280

def security_is_threat
  @data["security_is_threat"]
end

#security_is_torObject


256
257
258
# File 'lib/geocoder/results/ipregistry.rb', line 256

def security_is_tor
  @data["security_is_tor"]
end

#security_is_tor_exitObject


260
261
262
# File 'lib/geocoder/results/ipregistry.rb', line 260

def security_is_tor_exit
  @data["security_is_tor_exit"]
end

#stateObject


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

def state
  @data['location_region_name']
end

#state_codeObject


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

def state_code
  @data['location_region_code']
end

#time_zone_abbreviationObject


288
289
290
# File 'lib/geocoder/results/ipregistry.rb', line 288

def time_zone_abbreviation
  @data["time_zone_abbreviation"]
end

#time_zone_current_timeObject


292
293
294
# File 'lib/geocoder/results/ipregistry.rb', line 292

def time_zone_current_time
  @data["time_zone_current_time"]
end

#time_zone_idObject


284
285
286
# File 'lib/geocoder/results/ipregistry.rb', line 284

def time_zone_id
  @data["time_zone_id"]
end

#time_zone_in_daylight_savingObject


304
305
306
# File 'lib/geocoder/results/ipregistry.rb', line 304

def time_zone_in_daylight_saving
  @data["time_zone_in_daylight_saving"]
end

#time_zone_nameObject


296
297
298
# File 'lib/geocoder/results/ipregistry.rb', line 296

def time_zone_name
  @data["time_zone_name"]
end

#time_zone_offsetObject


300
301
302
# File 'lib/geocoder/results/ipregistry.rb', line 300

def time_zone_offset
  @data["time_zone_offset"]
end

#typeObject


64
65
66
# File 'lib/geocoder/results/ipregistry.rb', line 64

def type
  @data["type"]
end