Class: ExecJS::Runtime

Inherits:
Object
  • Object
show all
Defined in:
lib/isomorfeus/execjs_runtime.rb

Overview

Abstract base class for runtimes

Direct Known Subclasses

Isomorfeus::Speednode::Runtime

Instance Method Summary collapse

Instance Method Details

#permissive_bench(source, options = {}) ⇒ Object



4
5
6
7
# File 'lib/isomorfeus/execjs_runtime.rb', line 4

def permissive_bench(source, options = {})
  context = permissive_compile("", options)
  context.bench(source, options)
end

#permissive_compile(source, options = {}) ⇒ Object



19
20
21
# File 'lib/isomorfeus/execjs_runtime.rb', line 19

def permissive_compile(source, options = {})
  context_class.new(self, source, options.merge({permissive: true}))
end

#permissive_eval(source, options = {}) ⇒ Object



14
15
16
17
# File 'lib/isomorfeus/execjs_runtime.rb', line 14

def permissive_eval(source, options = {})
  context = permissive_compile("", options)
  context.eval(source, options)
end

#permissive_exec(source, options = {}) ⇒ Object



9
10
11
12
# File 'lib/isomorfeus/execjs_runtime.rb', line 9

def permissive_exec(source, options = {})
  context = permissive_compile("", options)
  context.exec(source, options)
end