Class: SimpleConfig::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_config.rb

Instance Method Summary collapse

Constructor Details

#initializeManager

Returns a new instance of Manager.



17
18
19
# File 'lib/simple_config.rb', line 17

def initialize
  @configs = {}
end

Instance Method Details

#for(config_name, &block) ⇒ Object



21
22
23
24
25
# File 'lib/simple_config.rb', line 21

def for(config_name, &block)
  config = (@configs[config_name] ||= Config.new)
  config.configure(&block) if block_given?
  config
end