Method: Parsey::ScanArray#each_with_type_indexed

Defined in:
lib/parsey.rb

#each_with_type_indexed {|Symbol, Object Integer| ... } ⇒ Object

Yields:

  • (Symbol, Object Integer)

    gives the type, content and index of each block in turn

See Also:



306
307
308
309
310
311
312
313
# File 'lib/parsey.rb', line 306

def each_with_type_indexed(&blck)
  ts = self.collect {|i| i[0]}
  cs = self.collect {|i| i[1]}
  (0...ts.size).each do |i|
    yield(ts[i], cs[i], i)
  end
  self
end