Class: OpenXml::Docx::Parts::Footer
- Inherits:
-
Part
- Object
- Part
- OpenXml::Docx::Parts::Footer
- Includes:
- RootNamespaces
- Defined in:
- lib/openxml/docx/parts/footer.rb
Constant Summary
Constants included from RootNamespaces
RootNamespaces::POSSIBLE_NAMESPACES
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
- #<<(child) ⇒ Object
-
#initialize ⇒ Footer
constructor
A new instance of Footer.
- #to_xml ⇒ Object
Methods included from RootNamespaces
Constructor Details
#initialize ⇒ Footer
Returns a new instance of Footer.
12 13 14 |
# File 'lib/openxml/docx/parts/footer.rb', line 12 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
10 11 12 |
# File 'lib/openxml/docx/parts/footer.rb', line 10 def children @children end |
Instance Method Details
#<<(child) ⇒ Object
16 17 18 |
# File 'lib/openxml/docx/parts/footer.rb', line 16 def <<(child) children << child end |
#to_xml ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/openxml/docx/parts/footer.rb', line 20 def to_xml build_xml do |xml| xml.ftr(root_namespaces) { xml.parent.namespace = :w children.each { |child| child.to_xml(xml) } } end end |