class V8::Portal::FunctionAdapter

Attributes

template[R]

Public Class Methods

new(portal, code) click to toggle source
# File lib/v8/portal/function.rb, line 7
def initialize(portal, code)
  @portal = portal
  @caller = case code
  when Method then BoundCall.new(portal)
  when UnboundMethod then BindAndCall.new(portal)
  else Call.new(portal)
  end
  @code = code
  @template = V8::C::FunctionTemplate::New(@caller, @code)
end

Public Instance Methods

function() click to toggle source
# File lib/v8/portal/function.rb, line 18
def function
  @template.GetFunction()
end