Class: ExecJS::JohnsonRuntime
- Inherits:
-
Object
- Object
- ExecJS::JohnsonRuntime
- Defined in:
- lib/execjs/johnson_runtime.rb
Defined Under Namespace
Classes: Context
Instance Method Summary collapse
- #available? ⇒ Boolean
- #compile(source) ⇒ Object
- #eval(source) ⇒ Object
- #exec(source) ⇒ Object
- #name ⇒ Object
Instance Method Details
#available? ⇒ Boolean
105 106 107 108 109 110 |
# File 'lib/execjs/johnson_runtime.rb', line 105 def available? require "johnson" true rescue LoadError false end |
#compile(source) ⇒ Object
101 102 103 |
# File 'lib/execjs/johnson_runtime.rb', line 101 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
96 97 98 99 |
# File 'lib/execjs/johnson_runtime.rb', line 96 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
91 92 93 94 |
# File 'lib/execjs/johnson_runtime.rb', line 91 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
87 88 89 |
# File 'lib/execjs/johnson_runtime.rb', line 87 def name "Johnson (SpiderMonkey)" end |