class MaxMind::GeoIP2::Model::Country
Model
class for the data returned by the GeoIP2
Country
web service and database. It is also used for GeoLite2 Country
lookups.
Attributes
Continent data for the IP address.
@return [MaxMind::GeoIP2::Record::Continent]
Data related to your MaxMind
account.
@return [MaxMind::GeoIP2::Record::MaxMind]
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.
@return [MaxMind::GeoIP2::Record::Country]
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.
@return [MaxMind::GeoIP2::Record::RepresentedCountry]
Data for the traits of the IP address.
@return [MaxMind::GeoIP2::Record::Traits]
Public Class Methods
@!visibility private
# File lib/maxmind/geoip2/model/country.rb, line 71 def initialize(record, locales) @continent = MaxMind::GeoIP2::Record::Continent.new( record['continent'], locales, ) @country = MaxMind::GeoIP2::Record::Country.new( record['country'], locales, ) @maxmind = MaxMind::GeoIP2::Record::MaxMind.new(record['maxmind']) @registered_country = MaxMind::GeoIP2::Record::Country.new( record['registered_country'], locales, ) @represented_country = MaxMind::GeoIP2::Record::RepresentedCountry.new( record['represented_country'], locales, ) @traits = MaxMind::GeoIP2::Record::Traits.new(record['traits']) end