Implementation of the PDF array type.
This is mainly done to provide automatic resolution of indirect object references when using the
 method. Therefore not all Array methods are implemented - use the
value directly if other methods are needed.
See: PDF2.0 s7.3.6
Public Instance Methods
Append a value to the array.
Returns the value at the given index, or a subarray using the given
length, or a subarray specified by
This method should be used instead of direct access to a value because it provides some advantages:
References are automatically resolved.
Returns the native Ruby object for values with class
HexaPDF::Object. However, all subclasses of
HexaPDF::Objectare returned as is (it makes no sense, for example, to return the hash that describes the Catalog instead of the Catalog object).
Deletes all values from the
PDFArray that are equal to the given object.
Returns the last deleted item, or
nil if no matching item is found.
Deletes the value at the given index.
Calls the given block once for every value of the array.
Note that the yielded value is already preprocessed like in
true if the array has no elements.
Returns the index of the first object such that object is == to
obj, or, if a block is given, the index of the first object for which the block returns
Insert one or more values into the array at the given index.
Returns the number of elements in the array.
Deletes all elements from the array for which the block returns
true. If no changes were done, returns
Deletes the element(s) given by an index (and optionally a length) or by a range, and returns them or
nil if the index is out of range.