Class: Geocoder::Lookup::Ip2locationLite
- Defined in:
- lib/geocoder/lookups/ip2location_lite.rb
Instance Attribute Summary collapse
-
#gem_name ⇒ Object
readonly
Returns the value of attribute gem_name.
Instance Method Summary collapse
-
#initialize ⇒ Ip2locationLite
constructor
A new instance of Ip2locationLite.
- #name ⇒ Object
- #required_api_key_parts ⇒ Object
Methods inherited from Base
#cache, #handle, #map_link_url, #query_url, #search, #supported_protocols
Constructor Details
#initialize ⇒ Ip2locationLite
Returns a new instance of Ip2locationLite.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/geocoder/lookups/ip2location_lite.rb', line 9 def initialize unless configuration[:file].nil? begin @gem_name = 'ip2location_ruby' require @gem_name rescue LoadError raise "Could not load IP2Location DB dependency. To use the IP2LocationLite lookup you must add the #{@gem_name} gem to your Gemfile or have it installed in your system." end end super end |
Instance Attribute Details
#gem_name ⇒ Object (readonly)
Returns the value of attribute gem_name.
7 8 9 |
# File 'lib/geocoder/lookups/ip2location_lite.rb', line 7 def gem_name @gem_name end |
Instance Method Details
#name ⇒ Object
21 22 23 |
# File 'lib/geocoder/lookups/ip2location_lite.rb', line 21 def name 'IP2LocationLite' end |
#required_api_key_parts ⇒ Object
25 26 27 |
# File 'lib/geocoder/lookups/ip2location_lite.rb', line 25 def required_api_key_parts [] end |