class V8::Portal::FunctionAdapter::Call

Public Class Methods

new(portal) click to toggle source
# File lib/v8/portal/function.rb, line 23
def initialize(portal)
  @portal = portal
end

Public Instance Methods

call(arguments) click to toggle source
# File lib/v8/portal/function.rb, line 27
def call(arguments)
  proc = arguments.Data()
  rbargs = [@portal.rb(arguments.This())]
  for i in 0..arguments.Length() - 1
    rbargs << @portal.rb(arguments[i])
  end
  @portal.caller.invoke(proc, *rbargs)
end