Module: GeoIP::CountryAccessors
- Defined in:
- lib/geoip.rb
Overview
:nodoc:
Constant Summary collapse
- ACCESSORS =
[ :request, :ip, :country_code, :country_code2, :country_code3, :country_name, :continent_code ]
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
1041 1042 1043 1044 1045 1046 |
# File 'lib/geoip.rb', line 1041 def to_hash ACCESSORS.inject({}) do |hash, key| hash[key] = self.send(key) hash end end |