Class: Uniword::FindReplace::FooterScope

Inherits:
Scope
  • Object
show all
Defined in:
lib/uniword/find_replace/footer_scope.rb

Overview

Footers scope: text in every word/footer*.xml. Walks all footer parts in the document's header-footer store.

Instance Method Summary collapse

Methods inherited from Scope

#initialize

Constructor Details

This class inherits a constructor from Uniword::FindReplace::Scope

Instance Method Details

#each_text_node {|text_element, accessor| ... } ⇒ Object

Yield Parameters:



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

def each_text_node
  parts = @document.header_footer_parts
  return unless parts

  containers = parts.of_kind(:footer).filter_map(&:content)
  each_text_in_containers(containers) { |*a| yield(*a) }
end

#nameSymbol

Returns:

  • (Symbol)


9
10
11
# File 'lib/uniword/find_replace/footer_scope.rb', line 9

def name
  :footers
end