module Praegustator

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/praegustator.rb, line 49
def self.config
  @config
end
configure_with(path_to_yaml_file) click to toggle source
# File lib/praegustator.rb, line 38
def self.configure_with(path_to_yaml_file)
  begin
    config = YAML::load(IO.read(path_to_yaml_file))
  rescue Psych::SyntaxError
    p  "error while parsing yaml configuration file. using defaults."; return
  rescue Errno::ENOENT
    p  "yaml configuration file couldn't be found. using defaults."; return
  end
  configure(config)  if config
end
reporter() click to toggle source
# File lib/praegustator.rb, line 53
def self.reporter
  @reporter
end

Private Class Methods

configure(opts = {}) click to toggle source
# File lib/praegustator.rb, line 58
def self.configure(opts = {})
  valid_keys = @config.keys
  opts.each {|k,v| @config[k] = v if valid_keys.include? k}
end