Module: Uniword::FindReplace::ParagraphWalker

Defined in:
lib/uniword/find_replace/paragraph_walker.rb

Overview

Walks an enumerable of containers (Body, TableCell, SDT, ...) and yields every Paragraph reachable. Used by all scopes that traverse paragraph-bearing parts (body, headers, footers, footnotes, endnotes, comments).

Class Method Summary collapse

Class Method Details

.each_paragraph(containers) {|paragraph| ... } ⇒ void

This method returns an undefined value.

Parameters:

  • containers (Enumerable<#paragraphs, #tables, #structured_document_tags>)

    containers to walk

Yield Parameters:



16
17
18
19
20
# File 'lib/uniword/find_replace/paragraph_walker.rb', line 16

def each_paragraph(containers, &block)
  containers.each do |container|
    walk_container(container, &block)
  end
end