Created
June 11, 2013 13:09
-
-
Save FUT/5756676 to your computer and use it in GitHub Desktop.
Simple yml-encoded settings implementation.
This file contains hidden or 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
class Settings | |
SETTINGS = YAML.load(File.read "#{Rails.root}/config/settings.yml")[Rails.env.to_sym] | |
def self.[](key) | |
SETTINGS[key] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment