Class: Geocoder::Configuration
- Inherits:
-
Object
- Object
- Geocoder::Configuration
- Defined in:
- lib/geocoder/configuration.rb
Class Method Summary collapse
- .options_and_defaults ⇒ Object
-
.set_defaults ⇒ Object
Set all values to default.
-
.yahoo_app_id=(value) ⇒ Object
legacy support.
Class Method Details
.options_and_defaults ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/geocoder/configuration.rb', line 4 def self. [ # geocoding service timeout (secs) [:timeout, 3], # name of geocoding service (symbol) [:lookup, :google], # ISO-639 language code [:language, :en], # use HTTPS for lookup requests? (if supported) [:use_https, false], # API key for geocoding service [:api_key, nil], # cache object (must respond to #[], #[]=, and #keys) [:cache, nil], # prefix (string) to use for all cache keys [:cache_prefix, "geocoder:"] ] end |
.set_defaults ⇒ Object
Set all values to default.
45 46 47 48 49 |
# File 'lib/geocoder/configuration.rb', line 45 def self.set_defaults self..each do |o,d| self.send("#{o}=", d) end end |
.yahoo_app_id=(value) ⇒ Object
legacy support
36 37 38 39 40 |
# File 'lib/geocoder/configuration.rb', line 36 def self.yahoo_app_id=(value) warn "DEPRECATION WARNING: Geocoder's 'yahoo_app_id' setting has been replaced by 'api_key'. " + "This method will be removed in Geocoder v1.0." @@api_key = value end |