Class: Autometal::Geoip::Organization
- Defined in:
- lib/geoip/organization.rb
Overview
GeoIPOrg database extension
provides Country and Organization (ISP) information
Instance Attribute Summary collapse
-
#organization ⇒ Object
Returns the value of attribute organization.
Attributes inherited from Package
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Package
#initialize, installed?, #lookup
Constructor Details
This class inherits a constructor from Autometal::Geoip::Package
Instance Attribute Details
#organization ⇒ Object
Returns the value of attribute organization.
8 9 10 |
# File 'lib/geoip/organization.rb', line 8 def organization @organization end |
Class Method Details
.data_file ⇒ Object
10 11 12 |
# File 'lib/geoip/organization.rb', line 10 def self.data_file File.join(Geoip::DATA_FILE_PATH,"GeoIPOrg.dat") end |
Instance Method Details
#process_response ⇒ Object
14 15 16 17 18 |
# File 'lib/geoip/organization.rb', line 14 def process_response ar = @response.split(": ") @version = ar[0].strip @organization = ar[1].strip end |