Class: Traceur::Template

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/traceur/template.rb

Constant Summary collapse

Node =
::ExecJS::ExternalRuntime.new(
  name: 'Node.js (V8)',
  command: ['nodejs', 'node'],
  runner_path: File.expand_path('../support/runner.js', __FILE__),
  encoding: 'UTF-8'
)

Instance Method Summary collapse

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



20
21
22
# File 'lib/traceur/template.rb', line 20

def evaluate(scope, locals, &block)
  @output ||= Node.exec(generate_source(scope))
end

#prepareObject



16
17
18
# File 'lib/traceur/template.rb', line 16

def prepare
  # required
end