Sha256: 50e8a97901738c1400b20323ad2876a56f3cc39bb671aa479276e66ba92f2d8b
Contents?: true
Size: 337 Bytes
Versions: 1
Compression:
Stored size: 337 Bytes
Contents
require 'uri' require 'net/http' require 'happymapper' module Ipgeobase autoload 'Version', 'ipgeobase/version' autoload 'IpMetaData', 'ipgeobase/ip_meta_data' def self.lookup(ip) uri = URI.parse('http://ipgeobase.ru:7020/geo') uri.query = URI.encode_www_form :ip => ip IpMetaData.parse(Net::HTTP.get(uri)) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ipgeobase-0.0.1 | lib/ipgeobase.rb |