Class: MaxMind::GeoIP2::Model::Country

Inherits:
Object
  • Object
show all
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

City

Instance Attribute Summary collapse

Instance Attribute Details

#continentMaxMind::GeoIP2::Record::Continent (readonly)

Continent data for the IP address.


18
19
20
# File 'lib/maxmind/geoip2/model/country.rb', line 18

def continent
  @continent
end

#countryMaxMind::GeoIP2::Record::Country (readonly)

Country data for the IP address. This object represents the country where MaxMind believes the end user is located.


24
25
26
# File 'lib/maxmind/geoip2/model/country.rb', line 24

def country
  @country
end

#maxmindMaxMind::GeoIP2::Record::MaxMind (readonly)

Data related to your MaxMind account.


29
30
31
# File 'lib/maxmind/geoip2/model/country.rb', line 29

def maxmind
  @maxmind
end

#registered_countryMaxMind::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.


36
37
38
# File 'lib/maxmind/geoip2/model/country.rb', line 36

def registered_country
  @registered_country
end

#represented_countryMaxMind::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.


43
44
45
# File 'lib/maxmind/geoip2/model/country.rb', line 43

def represented_country
  @represented_country
end

#traitsMaxMind::GeoIP2::Record::Traits (readonly)

Data for the traits of the IP address.


48
49
50
# File 'lib/maxmind/geoip2/model/country.rb', line 48

def traits
  @traits
end