Class: Ovto::Runtime

Inherits:
Object
  • Object
show all
Defined in:
lib/ovto/runtime.rb

Instance Method Summary collapse

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

#scheduleRenderObject



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