class Schked::Config

Attributes

logger[W]

Public Instance Methods

fire_callback(name, *args) click to toggle source
# File lib/schked/config.rb, line 25
def fire_callback(name, *args)
  callbacks[name].each do |callback|
    callback.call(*args)
  end
end
logger() click to toggle source
# File lib/schked/config.rb, line 17
def logger
  @logger ||= Logger.new($stdout).tap { |l| l.level = Logger::INFO }
end
logger?() click to toggle source
# File lib/schked/config.rb, line 13
def logger?
  !!@logger
end
paths() click to toggle source
# File lib/schked/config.rb, line 9
def paths
  @paths ||= []
end
register_callback(name, &block) click to toggle source
# File lib/schked/config.rb, line 21
def register_callback(name, &block)
  callbacks[name] << block
end

Private Instance Methods

callbacks() click to toggle source
# File lib/schked/config.rb, line 33
def callbacks
  @callbacks ||= Hash.new { |hsh, key| hsh[key] = [] }
end