Method: ExecJS::Runtime::Context#exec

Defined in:
lib/execjs/runtime.rb

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

Evaluates the source in the context of a function body and returns the returned value.

context.exec("return 1") # => 1
context.exec("1")        # => nil (nothing was returned)

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/execjs/runtime.rb', line 13

def exec(source, options = {})
  raise NotImplementedError
end