Class: Ovto::Runtime
- Inherits:
-
Object
- Object
- Ovto::Runtime
- Defined in:
- lib/ovto/runtime.rb
Instance Method Summary collapse
-
#initialize(app) ⇒ Runtime
constructor
A new instance of Runtime.
- #run(view, container) ⇒ Object
- #scheduleRender ⇒ Object
Constructor Details
#initialize(app) ⇒ Runtime
Returns a new instance of Runtime.
5 6 7 |
# File 'lib/ovto/runtime.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
#run(view, container) ⇒ Object
9 10 11 12 |
# File 'lib/ovto/runtime.rb', line 9 def run(view, container) getState = ->{ @app.state } @scheduleRender = `Ovto.run(getState, view, container)` end |
#scheduleRender ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/ovto/runtime.rb', line 14 def scheduleRender # An action is invoked before Ovto::Runtime#run. # Do nothing here because `scheduleRender` will eventually be called by #run return unless @scheduleRender @scheduleRender.call end |