Class: MaxMind::GeoIP2::Model::AnonymousIP
- Inherits:
-
Abstract
- Object
- Abstract
- MaxMind::GeoIP2::Model::AnonymousIP
- Defined in:
- lib/maxmind/geoip2/model/anonymous_ip.rb
Overview
Model class for the Anonymous IP database.
Instance Method Summary collapse
-
#anonymous? ⇒ Boolean
This is true if the IP address belongs to any sort of anonymous network.
-
#anonymous_vpn? ⇒ Boolean
This is true if the IP address is registered to an anonymous VPN provider.
-
#hosting_provider? ⇒ Boolean
This is true if the IP address belongs to a hosting or VPN provider (see description of the anonymous_vpn? method).
-
#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.
-
#public_proxy? ⇒ Boolean
This is true if the IP address belongs to a public proxy.
-
#residential_proxy? ⇒ Boolean
This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.
-
#tor_exit_node? ⇒ Boolean
This is true if the IP address is a Tor exit node.
Instance Method Details
#anonymous? ⇒ Boolean
This is true if the IP address belongs to any sort of anonymous network.
13 14 15 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 13 def anonymous? get('is_anonymous') end |
#anonymous_vpn? ⇒ Boolean
This is true if the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the hosting_provider? method.
23 24 25 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 23 def anonymous_vpn? get('is_anonymous_vpn') end |
#hosting_provider? ⇒ Boolean
This is true if the IP address belongs to a hosting or VPN provider (see description of the anonymous_vpn? method).
31 32 33 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 31 def hosting_provider? get('is_hosting_provider') end |
#ip_address ⇒ String
The IP address that the data in the model is for.
38 39 40 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 38 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.
47 48 49 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 47 def network get('network') end |
#public_proxy? ⇒ Boolean
This is true if the IP address belongs to a public proxy.
54 55 56 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 54 def public_proxy? get('is_public_proxy') end |
#residential_proxy? ⇒ Boolean
This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.
62 63 64 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 62 def residential_proxy? get('is_residential_proxy') end |
#tor_exit_node? ⇒ Boolean
This is true if the IP address is a Tor exit node.
69 70 71 |
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 69 def tor_exit_node? get('is_tor_exit_node') end |