Module: V8::Conversion::Code

Includes:
Weak::Cell
Included in:
Class, Method, Proc
Defined in:
lib/v8/conversion/code.rb

Defined Under Namespace

Classes: InvocationHandler

Instance Method Summary collapse

Methods included from Weak::Cell

#weakcell

Instance Method Details

#to_templateObject



11
12
13
# File 'lib/v8/conversion/code.rb', line 11

def to_template
  weakcell(:template) {V8::C::FunctionTemplate::New(InvocationHandler.new(self))}
end

#to_v8Object



5
6
7
8
9
# File 'lib/v8/conversion/code.rb', line 5

def to_v8
  fn = to_template.GetFunction()
  V8::Context.link self, fn
  return fn
end