Class: V8::Portal::FunctionAdapter::Call
- Defined in:
- lib/v8/portal/function.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(arguments) ⇒ Object
-
#initialize(portal) ⇒ Call
constructor
A new instance of Call.
Constructor Details
#initialize(portal) ⇒ Call
Returns a new instance of Call.
23 24 25 |
# File 'lib/v8/portal/function.rb', line 23 def initialize(portal) @portal = portal end |
Instance Method Details
#call(arguments) ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/v8/portal/function.rb', line 27 def call(arguments) proc = arguments.Data() = [@portal.rb(arguments.This())] for i in 0..arguments.Length() - 1 << @portal.rb(arguments[i]) end @portal.caller.invoke(proc, *) end |