2012-06-07 12:09:13 -04:00
|
|
|
class V8::Array < V8::Object
|
|
|
|
def each
|
|
|
|
@context.enter do
|
2012-06-07 12:40:53 -04:00
|
|
|
0.upto(@native.Length() - 1) do |i|
|
2012-06-07 12:09:13 -04:00
|
|
|
yield @context.to_ruby(@native.Get(i))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def length
|
|
|
|
@native.Length()
|
|
|
|
end
|
|
|
|
end
|