Class: Rhino::NativeFunction
- Inherits:
-
NativeObject
- Object
- NativeObject
- Rhino::NativeFunction
- Defined in:
- lib/rhino/native_function.rb
Overview
Instance Attribute Summary
Attributes inherited from NativeObject
Instance Method Summary collapse
Methods inherited from NativeObject
#[], #[]=, #each, #initialize, #to_h, #to_json
Constructor Details
This class inherits a constructor from Rhino::NativeObject
Instance Method Details
#call(*args) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/rhino/native_function.rb', line 13 def call(*args) begin cxt = J::Context.enter() scope = @j.getParentScope() || cxt.initStandardObjects() @j.call(cxt, scope, scope, args.map {|o| To.javascript(o)}) ensure J::Context.exit() end end |