Module: GeoIP::DB

Defined in:
lib/geoip-db.rb

Constant Summary collapse

URL =
URI.parse('http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz')
PATH =
File.expand_path(File.join(File.dirname(__FILE__), '..', 'data', 'GeoLiteCity.dat'))

Class Method Summary collapse

Class Method Details

.instanceObject



8
9
10
# File 'lib/geoip-db.rb', line 8

def self.instance
  Thread.current[:geoip] ||= GeoIP.new(PATH)
end