Class: MaxMind::GeoIP2::Record::City
- Defined in:
- lib/maxmind/geoip2/record/city.rb
Overview
City-level data associated with an IP address.
This record is returned by all location services and databases besides Country.
See Place for inherited methods.
Instance Method Summary collapse
-
#confidence ⇒ Integer?
A value from 0-100 indicating MaxMind’s confidence that the city is correct.
-
#geoname_id ⇒ Integer?
The GeoName ID for the city.
-
#names ⇒ Hash<String, String>?
A Hash where the keys are locale codes and the values are names.
Methods inherited from Place
Instance Method Details
#confidence ⇒ Integer?
A value from 0-100 indicating MaxMind’s confidence that the city is correct. This attribute is only available from the Insights service and the GeoIP2 Enterprise database.
20 21 22 |
# File 'lib/maxmind/geoip2/record/city.rb', line 20 def confidence get('confidence') end |
#geoname_id ⇒ Integer?
The GeoName ID for the city. This attribute is returned by all location services and databases.
28 29 30 |
# File 'lib/maxmind/geoip2/record/city.rb', line 28 def geoname_id get('geoname_id') end |
#names ⇒ Hash<String, String>?
A Hash where the keys are locale codes and the values are names. This attribute is returned by all location services and databases.
36 37 38 |
# File 'lib/maxmind/geoip2/record/city.rb', line 36 def names get('names') end |