Class: MaxMind::GeoIP2::Model::ISP

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

Overview

Model class for the GeoIP2 ISP 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/isp.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/isp.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/isp.rb', line 28

def ip_address
  get('ip_address')
end

#ispString?

The name of the ISP associated with the IP address.

Returns:

  • (String, nil)

35
36
37
# File 'lib/maxmind/geoip2/model/isp.rb', line 35

def isp
  get('isp')
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)

44
45
46
# File 'lib/maxmind/geoip2/model/isp.rb', line 44

def network
  get('network')
end

#organizationString?

The name of the organization associated with the IP address.

Returns:

  • (String, nil)

51
52
53
# File 'lib/maxmind/geoip2/model/isp.rb', line 51

def organization
  get('organization')
end