Module: IpLocatorCn
- Defined in:
- lib/ip_locator_cn.rb,
lib/ip_locator_cn/qqwry.rb,
lib/ip_locator_cn/version.rb,
lib/ip_locator_cn/qqwry/isp.rb,
lib/ip_locator_cn/qqwry/provinces.rb,
lib/ip_locator_cn/qqwry/city_directly.rb
Defined Under Namespace
Classes: QQWry
Constant Summary collapse
- VERSION =
'0.3.0'.freeze
Class Method Summary collapse
- .copywrite_url ⇒ Object
-
.data_path ⇒ Object
embeded qqwry.dat.
-
.live_data_url ⇒ Object
download url for qqwry.rar (uncracked).
- .resolve(ip, options = { dat_path: data_path }) ⇒ Object
Class Method Details
.copywrite_url ⇒ Object
15 16 17 |
# File 'lib/ip_locator_cn.rb', line 15 def self.copywrite_url 'http://update.cz88.net/ip/copywrite.rar' end |
.data_path ⇒ Object
embeded qqwry.dat
6 7 8 |
# File 'lib/ip_locator_cn.rb', line 6 def self.data_path File.('../../data/qqwry.dat', __FILE__) end |
.live_data_url ⇒ Object
download url for qqwry.rar (uncracked)
11 12 13 |
# File 'lib/ip_locator_cn.rb', line 11 def self.live_data_url 'http://update.cz88.net/ip/qqwry.rar' end |
.resolve(ip, options = { dat_path: data_path }) ⇒ Object
19 20 21 |
# File 'lib/ip_locator_cn.rb', line 19 def self.resolve(ip, ={ dat_path: data_path }) QQWry.new(**).resolve(ip) end |