Class: ExecJS::MustangRuntime
- Inherits:
-
Object
- Object
- ExecJS::MustangRuntime
- Defined in:
- lib/execjs/mustang_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
77 78 79 80 81 82 |
# File 'lib/execjs/mustang_runtime.rb', line 77 def available? require "mustang" true rescue LoadError false end |
#compile(source) ⇒ Object
73 74 75 |
# File 'lib/execjs/mustang_runtime.rb', line 73 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
68 69 70 71 |
# File 'lib/execjs/mustang_runtime.rb', line 68 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
63 64 65 66 |
# File 'lib/execjs/mustang_runtime.rb', line 63 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
59 60 61 |
# File 'lib/execjs/mustang_runtime.rb', line 59 def name "Mustang (V8)" end |