class V8::Portal::FunctionAdapter

def function

def function
  @template.GetFunction()
end

def initialize(portal, code)

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