Method: Parsey::ScanArray#each_with_type
- Defined in:
- lib/parsey.rb
#each_with_type {|Symbol, Object| ... } ⇒ StringScanner
Loops through the types and contents of each tag separately, passing them to the block given.
295 296 297 298 299 300 301 302 |
# File 'lib/parsey.rb', line 295 def each_with_type(&blck) ts = self.collect {|i| i[0]} cs = self.collect {|i| i[1]} (0...ts.size).each do |i| yield(ts[i], cs[i]) end self end |