Class: MaxMind::GeoIP2::Record::Continent

Inherits:
Place
  • Object
show all
Defined in:
lib/maxmind/geoip2/record/continent.rb

Overview

Contains data for the continent record associated with an IP address.

This record is returned by all location services and databases.

See Place for inherited methods.

Instance Method Summary collapse

Methods inherited from Place

#name

Instance Method Details

#codeString?

A two character continent code like “NA” (North America) or “OC” (Oceania). This attribute is returned by all location services and databases.

Returns:

  • (String, nil)


19
20
21
# File 'lib/maxmind/geoip2/record/continent.rb', line 19

def code
  get('code')
end

#geoname_idString?

The GeoName ID for the continent. This attribute is returned by all location services and databases.

Returns:

  • (String, nil)


27
28
29
# File 'lib/maxmind/geoip2/record/continent.rb', line 27

def geoname_id
  get('geoname_id')
end

#namesHash<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.

Returns:

  • (Hash<String, String>, nil)


35
36
37
# File 'lib/maxmind/geoip2/record/continent.rb', line 35

def names
  get('names')
end