Method: V8::Object#initialize
- Defined in:
- lib/v8/object.rb
#initialize(native = nil) ⇒ Object
Returns a new instance of Object.
6 7 8 9 10 |
# File 'lib/v8/object.rb', line 6 def initialize(native = nil) @context = V8::Context.current or fail "tried to initialize a #{self.class} without being in an entered V8::Context" @native = block_given? ? yield : native || V8::C::Object::New() @context.link self, @native end |