Class: Flame::Application::Config

Inherits:
Hash
  • Object
show all
Defined in:
lib/flame/application.rb

Overview

Class for Flame::Application.config

Instance Method Summary collapse

Constructor Details

#initialize(app, hash = {}) ⇒ Config

Returns a new instance of Config.



83
84
85
86
# File 'lib/flame/application.rb', line 83

def initialize(app, hash = {})
	@app = app
	replace(hash)
end

Instance Method Details

#[](key) ⇒ Object



88
89
90
91
92
93
94
# File 'lib/flame/application.rb', line 88

def [](key)
	result = super(key)
	if result.class <= Proc && result.parameters.empty?
		result = @app.class_exec(&result)
	end
	result
end