Class: OpenXml::Docx::Elements::Paragraph

Inherits:
Container show all
Defined in:
lib/openxml/docx/elements/paragraph.rb

Constant Summary

Constants included from AttributeBuilder

AttributeBuilder::VALID_THEME_COLORS, AttributeBuilder::VALID_TYPES

Instance Attribute Summary collapse

Attributes inherited from Container

#children

Instance Method Summary collapse

Methods inherited from Container

#<<, #initialize

Methods included from PropertyBuilder

included, #property_xml

Methods inherited from Element

#name, name, #namespace, #tag, tag

Methods included from AttributeBuilder

#attributes, included, #render?

Constructor Details

This class inherits a constructor from OpenXml::Docx::Elements::Container

Instance Attribute Details

#section_propertiesObject

Returns the value of attribute section_properties


5
6
7
# File 'lib/openxml/docx/elements/paragraph.rb', line 5

def section_properties
  @section_properties
end

Instance Method Details

#to_xml(xml) ⇒ Object


47
48
49
50
51
52
53
# File 'lib/openxml/docx/elements/paragraph.rb', line 47

def to_xml(xml)
  xml[namespace].public_send(tag, xml_attributes) {
    section_properties.to_xml(xml) unless section_properties.nil?
    property_xml(xml)
    children.each { |child| child.to_xml(xml) }
  }
end