Method: HexaPDF::PDFArray#index

Defined in:
lib/hexapdf/pdf_array.rb

#index(*obj, &block) ⇒ Object

:call-seq:

array.index(obj)              -> int or nil
array.index {|item| block }   -> int or nil
array.index                   -> Enumerator

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 true.



181
182
183
# File 'lib/hexapdf/pdf_array.rb', line 181

def index(*obj, &block)
  find_index(*obj, &block)
end