Method: Trusty::Environment::ClassMethods#config

Defined in:
lib/trusty/environment.rb

#config(default_value = nil) ⇒ Object



55
56
57
58
59
60
# File 'lib/trusty/environment.rb', line 55

def config(default_value = nil)
  # loads YAML on-the-fly when a key doesn't exist
  @config ||= Hashie::Mash.new do |hash, key|
    hash[key] = methodize_hash load_yaml_file("#{key}.yml", default_value)
  end
end