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
70 71 72 73 74 75 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 70 def available? require "rhino" true rescue LoadError false end |
#compile(source) ⇒ Object
66 67 68 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 66 def compile(source) Context.new(source) end |
#eval(source) ⇒ Object
61 62 63 64 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 61 def eval(source) context = Context.new context.eval(source) end |
#exec(source) ⇒ Object
56 57 58 59 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 56 def exec(source) context = Context.new context.exec(source) end |
#name ⇒ Object
52 53 54 |
# File 'lib/execjs/ruby_rhino_runtime.rb', line 52 def name "therubyrhino (Rhino)" end |