class Checkoff::ConfigLoader
Load configuration file
Public Class Methods
load(sym)
click to toggle source
# File lib/checkoff/config_loader.rb, line 41 def load(sym) yaml_result = load_yaml_file(sym) EnvFallbackConfigLoader.new(yaml_result, sym, yaml_filename(sym)) end
Private Class Methods
load_yaml_file(sym)
click to toggle source
# File lib/checkoff/config_loader.rb, line 48 def load_yaml_file(sym) filename = yaml_filename(sym) return {} unless File.exist?(filename) YAML.load_file(filename).with_indifferent_access end
yaml_filename(sym)
click to toggle source
# File lib/checkoff/config_loader.rb, line 55 def yaml_filename(sym) file = "#{sym}.yml" File.expand_path("~/.#{file}") end