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
106 107 108 109 110 111 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 106 def available? require "v8" true rescue LoadError false end |
#compile(source) ⇒ Object
102 103 104 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 102 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
97 98 99 100 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 97 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
92 93 94 95 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 92 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
88 89 90 |
# File 'lib/execjs/ruby_racer_runtime.rb', line 88 def name "therubyracer (V8)" end |