Module: GeoIP::CityAccessors

Defined in:
lib/geoip.rb

Overview

:nodoc:

Constant Summary collapse

ACCESSORS =
[
  :request, :ip, :country_code2, :country_code3, :country_name, :continent_code,
  :region_name, :city_name, :postal_code, :latitude, :longitude, :dma_code, :area_code, :timezone
]

Instance Method Summary collapse

Instance Method Details

#to_hashObject



1058
1059
1060
1061
1062
1063
# File 'lib/geoip.rb', line 1058

def to_hash
  ACCESSORS.inject({}) do |hash, key|
    hash[key] = self.send(key)
    hash
  end
end