Class: Clearwater::Application
- Inherits:
-
Object
- Object
- Clearwater::Application
- Defined in:
- lib/clearwater/application.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#router ⇒ Object
readonly
Returns the value of attribute router.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Application
constructor
A new instance of Application.
- #render ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Application
Returns a new instance of Application.
5 6 7 8 9 10 |
# File 'lib/clearwater/application.rb', line 5 def initialize ={} @router = .fetch(:router) { Router.new } @component = .fetch(:component) { nil } router.application = self component.router = router end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
3 4 5 |
# File 'lib/clearwater/application.rb', line 3 def component @component end |
#router ⇒ Object (readonly)
Returns the value of attribute router.
3 4 5 |
# File 'lib/clearwater/application.rb', line 3 def router @router end |
Instance Method Details
#render ⇒ Object
12 13 14 15 |
# File 'lib/clearwater/application.rb', line 12 def render router.set_outlets component.to_s end |