Class: Sharp::Config
- Inherits:
-
Object
- Object
- Sharp::Config
- Defined in:
- lib/sharp/config.rb
Instance Method Summary collapse
-
#initialize(env, files) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(env, files) ⇒ Config
Returns a new instance of Config.
3 4 5 6 7 8 9 |
# File 'lib/sharp/config.rb', line 3 def initialize(env, files) files.each do |file| attr = File.basename(file, '.yml').to_sym (class << self; self; end).send(:attr_accessor, attr) send("#{attr}=", YAML.load_file(file).symbolize_keys[env].symbolize_keys) end end |