class MaxMind::GeoIP2::Model::Domain

Model class for the GeoIP2 Domain database.

Public Instance Methods

domain() click to toggle source

The second level domain associated with the IP address. This will be something like “example.com” or “example.co.uk”, not “foo.example.com”.

@return [String, nil]

# File lib/maxmind/geoip2/model/domain.rb, line 14
def domain
  get('domain')
end
ip_address() click to toggle source

The IP address that the data in the model is for.

@return [String]

# File lib/maxmind/geoip2/model/domain.rb, line 21
def ip_address
  get('ip_address')
end
network() click to toggle source

The network in CIDR notation associated with the record. In particular, this is the largest network where all of the fields besides ip_address have the same value.

@return [String]

# File lib/maxmind/geoip2/model/domain.rb, line 30
def network
  get('network')
end