Class: MaxMind::GeoIP2::Model::ASN

Inherits:
Abstract
  • Object
show all
Defined in:
lib/maxmind/geoip2/model/asn.rb

Overview

Model class for the GeoLite2 ASN database.

Instance Method Summary collapse

Instance Method Details

#autonomous_system_numberInteger?

The autonomous system number associated with the IP address.

Returns:

  • (Integer, nil)

13
14
15
# File 'lib/maxmind/geoip2/model/asn.rb', line 13

def autonomous_system_number
  get('autonomous_system_number')
end

#autonomous_system_organizationString?

The organization associated with the registered autonomous system number for the IP address.

Returns:

  • (String, nil)

21
22
23
# File 'lib/maxmind/geoip2/model/asn.rb', line 21

def autonomous_system_organization
  get('autonomous_system_organization')
end

#ip_addressString

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

Returns:

  • (String)

28
29
30
# File 'lib/maxmind/geoip2/model/asn.rb', line 28

def ip_address
  get('ip_address')
end

#networkString

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.

Returns:

  • (String)

37
38
39
# File 'lib/maxmind/geoip2/model/asn.rb', line 37

def network
  get('network')
end