Class: Burn::Configuration::Loader
- Inherits:
-
Object
- Object
- Burn::Configuration::Loader
- Defined in:
- lib/burn/config/loader.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize(code) ⇒ Loader
constructor
A new instance of Loader.
- #method_missing(method_symbol, *args, &block) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_symbol, *args, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/burn/config/loader.rb', line 12 def method_missing(method_symbol, *args, &block) if method_symbol == :config then if args[0] == :server then @server.instance_eval &block elsif args[0] == :app then @app.instance_eval &block end end end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
4 5 6 |
# File 'lib/burn/config/loader.rb', line 4 def app @app end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
4 5 6 |
# File 'lib/burn/config/loader.rb', line 4 def server @server end |