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.



62
63
64
65
# File 'lib/flame/application.rb', line 62

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

Instance Method Details

#[](key) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/flame/application.rb', line 67

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