Class: Geocoder::Result::Ip2locationIo
- Defined in:
- lib/geocoder/results/ip2location_io.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#coordinates, #country, #country_code, #initialize, #latitude, #longitude, #province, #province_code, #state, #state_code
Constructor Details
This class inherits a constructor from Geocoder::Result::Base
Class Method Details
.response_attributes ⇒ Object
10 11 12 13 |
# File 'lib/geocoder/results/ip2location_io.rb', line 10 def self.response_attributes %w[ip country_code country_name region_name city_name latitude longitude zip_code time_zone asn as is_proxy] end |
Instance Method Details
#address(format = :full) ⇒ Object
6 7 8 |
# File 'lib/geocoder/results/ip2location_io.rb', line 6 def address(format = :full) "#{city_name} #{zip_code}, #{country_name}".sub(/^[ ,]*/, '') end |