Class: V8::Array
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(native_or_length = nil) ⇒ Array
constructor
A new instance of Array.
- #length ⇒ Object
Methods inherited from Object
#[], #[]=, #keys, #method_missing, #respond_to?, #to_s, #values
Constructor Details
#initialize(native_or_length = nil) ⇒ Array
Returns a new instance of Array.
3 4 5 6 7 8 9 10 11 12 13 |
# 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 |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class V8::Object