Class: ExecJS::DisabledRuntime

Inherits:
Runtime
  • Object
show all
Defined in:
lib/execjs/disabled_runtime.rb

Instance Method Summary collapse

Methods inherited from Runtime

#context_class

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/execjs/disabled_runtime.rb', line 25

def available?
  true
end

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

Raises:



17
18
19
# File 'lib/execjs/disabled_runtime.rb', line 17

def compile(source, options = {})
  raise Error, "ExecJS disabled"
end

#deprecated?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/execjs/disabled_runtime.rb', line 21

def deprecated?
  true
end

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

Raises:



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

def eval(source, options = {})
  raise Error, "ExecJS disabled"
end

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

Raises:



9
10
11
# File 'lib/execjs/disabled_runtime.rb', line 9

def exec(source, options = {})
  raise Error, "ExecJS disabled"
end

#nameObject



5
6
7
# File 'lib/execjs/disabled_runtime.rb', line 5

def name
  "Disabled"
end