Class: V8::Array

Inherits:
Object show all
Defined in:
lib/v8/array.rb

Instance Method Summary collapse

Methods inherited from Object

#[], #[]=, #initialize, #method_missing, #respond_to?, #to_s

Constructor Details

This class inherits a constructor from V8::Object

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class V8::Object

Instance Method Details

#eachObject



5
6
7
8
9
10
11
# File 'lib/v8/array.rb', line 5

def each
  @portal.open do |to|
    for i in 0..(@native.Length() - 1)
      yield to.rb(@native.Get(i))
    end
  end
end

#lengthObject



13
14
15
# File 'lib/v8/array.rb', line 13

def length
  @native.Length()
end