Module: V8::Conversion::NativeObject

Defined in:
lib/v8/conversion/object.rb

Instance Method Summary collapse

Instance Method Details

#to_rubyObject


13
14
15
16
17
18
19
20
21
22
# File 'lib/v8/conversion/object.rb', line 13

def to_ruby
  wrap = if IsArray()
    ::V8::Array
  elsif IsFunction()
    ::V8::Function
  else
    ::V8::Object
  end
  wrap.new(self)
end

#to_v8Object


24
25
26
# File 'lib/v8/conversion/object.rb', line 24

def to_v8
  self
end