class PINS::Config

Attributes

dump_errors[RW]
handler_paths[RW]
logging[RW]
passwords[RW]
user[RW]

Public Class Methods

load_config(path) click to toggle source

Load Ruby config file @param path [String] config file

# File lib/postmark-inbound/config.rb, line 11
def self.load_config(path)
  raise 'config file missing' unless path
  PINS.logger.debug("Loading config file: #{path}")
  require File.expand_path(path)
  PINS.logger.info('Config.load_config done.')
end
new() click to toggle source
# File lib/postmark-inbound/config.rb, line 36
def initialize
  @passwords = []
  @handler_paths = []
  @dump_errors = false
  @logging = false
end
setup() { |shared| ... } click to toggle source

Call this from your config file

# File lib/postmark-inbound/config.rb, line 25
def self.setup
  yield Config.shared
  PINS.logger.debug('Config.setup block executed.')
end
shared() click to toggle source

Returns the shared instance @return [PINS::Config]

# File lib/postmark-inbound/config.rb, line 20
def self.shared
  @shared_config ||= Config.new
end