module Streetline::Configuration
Constants
- DEFAULT_API_ENDPOINT
- DEFAULT_API_TOKEN
- DEFAULT_USER_AGENT
- VALID_OPTIONS_KEYS
Public Class Methods
extended(base)
click to toggle source
# File lib/streetline/configuration.rb, line 13 def self.extended(base) base.reset! end
Public Instance Methods
configure() { |self| ... }
click to toggle source
Convenience method to allow configuration options to be set in a block
# File lib/streetline/configuration.rb, line 18 def configure yield self end
options()
click to toggle source
# File lib/streetline/configuration.rb, line 22 def options Hash[ * VALID_OPTIONS_KEYS.map { |key| [key, send(key)] }.flatten ] end
reset!()
click to toggle source
# File lib/streetline/configuration.rb, line 26 def reset! self.api_endpoint = DEFAULT_API_ENDPOINT self.api_token = DEFAULT_API_TOKEN self.user_agent = DEFAULT_USER_AGENT return true end