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.



75
76
77
78
# File 'lib/flame/application.rb', line 75

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

Instance Method Details

#[](key) ⇒ Object



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

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