Class: Flame::Application::Config
- Inherits:
-
Hash
- Object
- Hash
- Flame::Application::Config
- Defined in:
- lib/flame/application.rb
Overview
Class for Flame::Application.config
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(app, hash = {}) ⇒ Config
constructor
A new instance of Config.
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 |