Class: ExecJS::RubyRhinoRuntime
- Inherits:
-
Object
- Object
- ExecJS::RubyRhinoRuntime
- Defined in:
- lib/execjs/ruby_rhino_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
87 88 89 90 91 92 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 87 def available? require "rhino" true rescue LoadError false end |
#compile(source) ⇒ Object
83 84 85 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 83 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
78 79 80 81 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 78 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
73 74 75 76 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 73 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
69 70 71 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 69 def name "therubyrhino (Rhino)" end |