Class: OpenXml::Docx::Elements::Numbering
- Inherits:
-
OpenXml::Docx::Element
- Object
- Element
- OpenXml::Docx::Element
- OpenXml::Docx::Elements::Numbering
- Includes:
- HasChildren, HasProperties
- Defined in:
- lib/openxml/docx/elements/numbering.rb
Instance Method Summary collapse
-
#initialize(id) ⇒ Numbering
constructor
A new instance of Numbering.
- #property_xml(xml) ⇒ Object
Methods included from HasProperties
Constructor Details
#initialize(id) ⇒ Numbering
Returns a new instance of Numbering.
8 9 10 11 |
# File 'lib/openxml/docx/elements/numbering.rb', line 8 def initialize(id) super() self.id = id end |
Instance Method Details
#property_xml(xml) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/openxml/docx/elements/numbering.rb', line 20 def property_xml(xml) props = properties.keys.map(&method(:send)).compact return if props.none?(&:render?) props.each { |prop| prop.to_xml(xml) } end |