class V8::Array
Public Class Methods
new(native_or_length = nil)
click to toggle source
Calls superclass method
V8::Object.new
# File lib/v8/array.rb, line 3 def initialize(native_or_length = nil) super do if native_or_length.is_a?(Numeric) V8::C::Array::New(native_or_length) elsif native_or_length.is_a?(V8::C::Array) native_or_length else V8::C::Array::New() end end end
Public Instance Methods
each() { |to_ruby(native.Get(i))| ... }
click to toggle source
# File lib/v8/array.rb, line 15 def each @context.enter do 0.upto(@native.Length() - 1) do |i| yield @context.to_ruby(@native.Get(i)) end end end
length()
click to toggle source
# File lib/v8/array.rb, line 23 def length @native.Length() end