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.



25
26
27
# File 'lib/simple_config.rb', line 25

def initialize
  @configs = {}
end

Instance Method Details

#for(config_name, &block) ⇒ Object



29
30
31
32
33
# File 'lib/simple_config.rb', line 29

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