Class: MaxMind::GeoIP2::Model::Country
- Inherits:
-
Object
- Object
- MaxMind::GeoIP2::Model::Country
- Defined in:
- lib/maxmind/geoip2/model/country.rb
Overview
Model class for the data returned by the GeoIP2 Country web service and database. It is also used for GeoLite2 Country lookups.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#continent ⇒ MaxMind::GeoIP2::Record::Continent
readonly
Continent data for the IP address.
-
#country ⇒ MaxMind::GeoIP2::Record::Country
readonly
Country data for the IP address.
-
#maxmind ⇒ MaxMind::GeoIP2::Record::MaxMind
readonly
Data related to your MaxMind account.
-
#registered_country ⇒ MaxMind::GeoIP2::Record::Country
readonly
Registered country data for the IP address.
-
#represented_country ⇒ MaxMind::GeoIP2::Record::RepresentedCountry
readonly
Represented country data for the IP address.
-
#traits ⇒ MaxMind::GeoIP2::Record::Traits
readonly
Data for the traits of the IP address.
Instance Attribute Details
#continent ⇒ MaxMind::GeoIP2::Record::Continent (readonly)
Continent data for the IP address.
38 39 40 |
# File 'lib/maxmind/geoip2/model/country.rb', line 38 def continent @continent end |
#country ⇒ MaxMind::GeoIP2::Record::Country (readonly)
Country data for the IP address. This object represents the country where MaxMind believes the end user is located.
44 45 46 |
# File 'lib/maxmind/geoip2/model/country.rb', line 44 def country @country end |
#maxmind ⇒ MaxMind::GeoIP2::Record::MaxMind (readonly)
Data related to your MaxMind account.
49 50 51 |
# File 'lib/maxmind/geoip2/model/country.rb', line 49 def maxmind @maxmind end |
#registered_country ⇒ MaxMind::GeoIP2::Record::Country (readonly)
Registered country data for the IP address. This record represents the country where the ISP has registered a given IP block and may differ from the user’s country.
56 57 58 |
# File 'lib/maxmind/geoip2/model/country.rb', line 56 def registered_country @registered_country end |
#represented_country ⇒ MaxMind::GeoIP2::Record::RepresentedCountry (readonly)
Represented country data for the IP address. The represented country is used for things like military bases. It is only present when the represented country differs from the country.
63 64 65 |
# File 'lib/maxmind/geoip2/model/country.rb', line 63 def represented_country @represented_country end |
#traits ⇒ MaxMind::GeoIP2::Record::Traits (readonly)
Data for the traits of the IP address.
68 69 70 |
# File 'lib/maxmind/geoip2/model/country.rb', line 68 def traits @traits end |