Module: V8::Conversion::Array

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

Instance Method Summary collapse

Instance Method Details

#to_v8Object


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

def to_v8
  array = V8::Array.new(length)
  each_with_index do |item, i|
    array[i] = item
  end
  return array.to_v8
end