Class | AppConfig |
In: |
lib/app_config.rb
|
Parent: | Object |
# File lib/app_config.rb, line 2 2: def self.load 3: config_file = File.join(RAILS_ROOT, "config", "application.yml") 4: 5: if File.exists?(config_file) 6: config = YAML.load(File.read(config_file))[RAILS_ENV] 7: 8: config.keys.each do |key| 9: cattr_accessor key 10: send("#{key}=", config[key]) 11: end 12: end 13: end