Created
May 28, 2009 05:20
-
-
Save c4milo/119109 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'singleton' | |
class Configuration | |
include Singleton | |
def initialize | |
config_file = File.join(RAILS_ROOT, "config", "application.yml") | |
if File.exists?(config_file) | |
config = YAML.load(File.read(config_file))[RAILS_ENV] | |
config.keys.each do |key| | |
attr_accessor key | |
send "#{key}=", config[key] | |
end | |
end | |
end | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
home/camilo/Development/ontoworks/accounts/ontoworks-accounts/lib/configuration.rb:13:in `initialize': undefined method `attr_accessor' for #<Configuration:0x7fc5a87e16c8> (NoMethodError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment