module Flowthings::Configuration

Constants

DEFAULT_ACCOUNT_NAME
DEFAULT_ACCOUNT_TOKEN
DEFAULT_ENDPOINT
DEFAULT_PLATFORM_VERSION
DEFAULT_SECURE
DEFAULT_USER_AGENT
VALID_CONFIG_KEYS
VALID_CONNECTION_KEYS
VALID_OPTIONS_KEYS

Public Class Methods

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

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/flowthings/configuration.rb, line 31
def configure
  yield self
end
options() click to toggle source
# File lib/flowthings/configuration.rb, line 35
def options
  Hash[ * VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten]
end
reset() click to toggle source
# File lib/flowthings/configuration.rb, line 21
def reset
  self.endpoint = DEFAULT_ENDPOINT
  self.user_agent = DEFAULT_USER_AGENT
  self.secure = DEFAULT_SECURE
  self.platform_version = DEFAULT_PLATFORM_VERSION

  self.account_token = DEFAULT_ACCOUNT_TOKEN
  self.account_name = DEFAULT_ACCOUNT_NAME
end