A number of non-routable IP ranges.
– Sources for these:
RFC 3330: Special-Use IPv4 Addresses The bogon list: http://www.cymru.com/Documents/bogon-list.html
# File lib/geokit/geocoders/base_ip.rb, line 29 def self.ip?(ip) /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/.match(ip) end
Checks whether the IP address belongs to a private address range.
This function is used to reduce the number of useless queries made to the geocoding service. Such queries can occur frequently during integration tests.
# File lib/geokit/geocoders/base_ip.rb, line 43 def self.private_ip_address?(ip) NON_ROUTABLE_IP_RANGES.any? { |range| range.include?(ip) } end
Generated with the Darkfish Rdoc Generator 2.