Method: HexaPDF::PDFArray#each

Defined in:
lib/hexapdf/pdf_array.rb

#eachObject

:call-seq:

array.each {|value| block}    -> array
array.each                    -> Enumerator

Calls the given block once for every value of the array.

Note that the yielded value is already preprocessed like in #[].



203
204
205
206
207
# File 'lib/hexapdf/pdf_array.rb', line 203

def each
  return to_enum(__method__) unless block_given?
  value.each_index {|index| yield(self[index]) }
  self
end