Class: Sol::JSArray
Overview
Instance Attribute Summary
Attributes inherited from JSObject
Instance Method Summary collapse
-
#[](index) ⇒ Object
————————————————————————————.
-
#array? ⇒ Boolean
————————————————————————————.
-
#get(index) ⇒ Object
————————————————————————————.
-
#length ⇒ Object
————————————————————————————.
Methods inherited from JSObject
#assign, #boolean?, #boolean_object?, build, #function?, #initialize, #instanceof, #method_missing, #nil?, #number?, #number_object?, #object?, #string?, #string_object?, #typeof, #undefined?
Constructor Details
This class inherits a constructor from Sol::JSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Sol::JSObject
Instance Method Details
#[](index) ⇒ Object
52 53 54 |
# File 'lib/jx/jsarray.rb', line 52 def [](index) get(index) end |
#array? ⇒ Boolean
36 37 38 |
# File 'lib/jx/jsarray.rb', line 36 def array? true end |
#get(index) ⇒ Object
44 45 46 |
# File 'lib/jx/jsarray.rb', line 44 def get(index) JSObject.build(@jsvalue.get(index), @jsvalue) # @jsvalue end |
#length ⇒ Object
60 61 62 |
# File 'lib/jx/jsarray.rb', line 60 def length @jsvalue.length end |