module Busibe::Configuration

Constants

DEFAULT_ACCESS_TOKEN
DEFAULT_ENDPOINT
DEFAULT_FORMAT
DEFAULT_PUBLIC_KEY
DEFAULT_REQUEST_METHOD
DEFAULT_USER_AGENT
VALID_CONFIG_KEYS
VALID_CONNECTION_KEYS
VALID_OPTIONS_KEYS

Public Class Methods

extended(base) click to toggle source
# File lib/busibe/configuration.rb, line 17
def self.extended(base)
  base.reset
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/busibe/configuration.rb, line 32
def configure
  yield self
end
options() click to toggle source
# File lib/busibe/configuration.rb, line 36
def options
  Hash[*VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten]
end
reset() click to toggle source

reset config settings

# File lib/busibe/configuration.rb, line 22
def reset
  self.endpoint = DEFAULT_ENDPOINT
  self.request_method = DEFAULT_REQUEST_METHOD
  self.user_agent     = DEFAULT_USER_AGENT

  self.public_key     = DEFAULT_PUBLIC_KEY
  self.access_token   = DEFAULT_ACCESS_TOKEN
  self.format         = DEFAULT_FORMAT
end