Class: GeoIP::ISP
Instance Method Summary collapse
-
#initialize(*args) ⇒ ISP
constructor
A new instance of ISP.
- #look_up(addr) ⇒ Object
Methods included from Base
Constructor Details
#initialize(*args) ⇒ ISP
Returns a new instance of ISP.
8 9 10 |
# File 'lib/ffi-geoip/isp.rb', line 8 def initialize(*args) initialize_geoip(*args) end |
Instance Method Details
#look_up(addr) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ffi-geoip/isp.rb', line 12 def look_up(addr) addr = value_to_addr(addr) check_type(addr, String) fix_encoding(:isp => FFIGeoIP.GeoIP_name_by_addr(@ptr, addr)) end |