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
80 81 82 83 84 85 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 80 def available? require "v8" true rescue LoadError false end |
#compile(source) ⇒ Object
76 77 78 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 76 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
71 72 73 74 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 71 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
66 67 68 69 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 66 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
62 63 64 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 62 def name "therubyracer (V8)" end |