Class: Geocoder::Lookup::MaxmindLocal
- Defined in:
- lib/geocoder/lookups/maxmind_local.rb
Instance Method Summary collapse
-
#initialize ⇒ MaxmindLocal
constructor
A new instance of MaxmindLocal.
- #name ⇒ Object
- #required_api_key_parts ⇒ Object
Methods inherited from Base
#cache, #handle, #map_link_url, #query_url, #search
Constructor Details
#initialize ⇒ MaxmindLocal
Returns a new instance of MaxmindLocal.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/geocoder/lookups/maxmind_local.rb', line 8 def initialize if !configuration[:file].nil? begin gem = RUBY_PLATFORM == 'java' ? 'jgeoip' : 'geoip' require gem rescue LoadError raise "Could not load geoip dependency. To use MaxMind Local lookup you must add the #{gem} gem to your Gemfile or have it installed in your system." end end super end |
Instance Method Details
#name ⇒ Object
20 21 22 |
# File 'lib/geocoder/lookups/maxmind_local.rb', line 20 def name "MaxMind Local" end |
#required_api_key_parts ⇒ Object
24 25 26 |
# File 'lib/geocoder/lookups/maxmind_local.rb', line 24 def required_api_key_parts [] end |