Class: MaxMind::GeoIP2::Model::Domain
- Inherits:
-
Abstract
- Object
- Abstract
- MaxMind::GeoIP2::Model::Domain
- Defined in:
- lib/maxmind/geoip2/model/domain.rb
Overview
Model class for the GeoIP2 Domain database.
Instance Method Summary collapse
-
#domain ⇒ String?
The second level domain associated with the IP address.
-
#ip_address ⇒ String
The IP address that the data in the model is for.
-
#network ⇒ String
The network in CIDR notation associated with the record.
Instance Method Details
#domain ⇒ String?
The second level domain associated with the IP address. This will be something like “example.com” or “example.co.uk”, not “foo.example.com”.
14 15 16 |
# File 'lib/maxmind/geoip2/model/domain.rb', line 14 def domain get('domain') end |
#ip_address ⇒ String
The IP address that the data in the model is for.
21 22 23 |
# File 'lib/maxmind/geoip2/model/domain.rb', line 21 def ip_address get('ip_address') end |
#network ⇒ String
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.
30 31 32 |
# File 'lib/maxmind/geoip2/model/domain.rb', line 30 def network get('network') end |