Class: Webr::Runtime

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script) ⇒ Runtime

Returns a new instance of Runtime.



11
12
13
14
15
16
17
# File 'lib/webr/runtime.rb', line 11

def initialize(script)
  @node = Rednode::Node.new(script)
  @process = Rednode::Process.new(@node)

  @portal = Portal.new(@node)
  @process.webr = @portal
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



9
10
11
# File 'lib/webr/runtime.rb', line 9

def node
  @node
end

#portalObject (readonly)

Returns the value of attribute portal.



9
10
11
# File 'lib/webr/runtime.rb', line 9

def portal
  @portal
end

#processObject (readonly)

Returns the value of attribute process.



9
10
11
# File 'lib/webr/runtime.rb', line 9

def process
  @process
end

Instance Method Details

#startObject



19
20
21
# File 'lib/webr/runtime.rb', line 19

def start
  @node.start(@process)
end