module IPIP

Constants

VERSION

Public Class Methods

find(ip) click to toggle source
# File lib/ipip.rb, line 10
def find(ip)
  ipv4_database.find(ip)
end
ipv4_database(data_file = nil) click to toggle source
# File lib/ipip.rb, line 20
def ipv4_database(data_file = nil)
  @ipv4_database ||= IPv4Database.new(data_file)
end
load_data!(data_file) click to toggle source
# File lib/ipip.rb, line 14
def load_data!(data_file)
  raise 'No such file' unless File.exists?(data_file)

  ipv4_database(data_file)
end