module FimmedUp::Configuration

Constants

DEFAULT_ENDPOINT
DEFAULT_METHOD
DEFAULT_PASSWORD
DEFAULT_RESOURCE
DEFAULT_USERNAME
VALID_CONFIG_KEYS
VALID_CONNECTION_KEYS
VALID_OPTIONS_KEYS

Public Class Methods

extended(base) click to toggle source

Make sure we have the default values set when we get 'extended'

# File lib/fimmed_up/configuration.rb, line 18
def self.extended(base)
  base.reset
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/fimmed_up/configuration.rb, line 30
def configure
  yield self
end
options() click to toggle source
# File lib/fimmed_up/configuration.rb, line 34
def options
  Hash[ * VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten ]
end
reset() click to toggle source
# File lib/fimmed_up/configuration.rb, line 22
def reset
  self.endpoint   = DEFAULT_ENDPOINT
  self.method     = DEFAULT_METHOD      
  self.username   = DEFAULT_USERNAME
  self.password   = DEFAULT_PASSWORD
  self.resource   = DEFAULT_RESOURCE
end