Class: ExecJS::RubyRacerRuntime
- Inherits:
-
Object
- Object
- ExecJS::RubyRacerRuntime
- Defined in:
- lib/execjs/ruby_racer_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
72 73 74 75 76 77 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 72 def available? require "v8" true rescue LoadError false end |
#compile(source) ⇒ Object
68 69 70 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 68 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
63 64 65 66 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 63 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
58 59 60 61 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 58 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
54 55 56 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 54 def name "therubyracer (V8)" end |