class Juli::Util::Config

config with hard-coded default

Constants

DEFAULT

Attributes

conf[R]

Public Class Methods

new() click to toggle source
# File lib/juli/util.rb, line 143
def initialize
  path  = File.join(Juli::Util::juli_repo, Juli::REPO, 'config')
  hash  = File.exist?(path) ?
      YAML::load(ERB.new(File.read(path)).result) :
      {}

  # YAML::load('') returns false so that set empty hash
  hash = {} if hash == false
  @conf = DEFAULT.dup.merge(hash)
end