class SoraGeocoding::Configuration
Constants
- OPTIONS
Attributes
data[RW]
Public Class Methods
new()
click to toggle source
# File lib/sora_geocoding/configuration.rb, line 82 def initialize @data = SoraGeocoding::ConfigurationHash.new set_defaults end
set_defaults()
click to toggle source
# File lib/sora_geocoding/configuration.rb, line 65 def self.set_defaults instance.set_defaults end
Public Instance Methods
configure(options)
click to toggle source
# File lib/sora_geocoding/configuration.rb, line 78 def configure(options) @data.rmerge!(options) end
set_defaults()
click to toggle source
# File lib/sora_geocoding/configuration.rb, line 87 def set_defaults # options @data[:timeout] = 3 # timeout (secs) @data[:http_headers] = {} # HTTP headers @data[:use_https] = false # use HTTPS for requests? @data[:http_proxy] = nil # HTTP proxy server (user:pass@host:port) @data[:https_proxy] = nil # HTTPS proxy server (user:pass@host:port) @data[:basic_auth] = {} # user and password for basic auth ({:user => "user", :password => "password"}) @data[:site] = nil @data[:yahoo_appid] = nil # API key for Yahoo Geocoder API @data[:logger_level] = ::Logger::WARN # log level, if kernel logger is used # [supports] # - :all # - SocketError # - Timeout::Error @data[:always_raise] = [] end