Class: OpenXml::Docx::Elements::Numbering

Inherits:
OpenXml::Docx::Element show all
Includes:
HasChildren, HasProperties
Defined in:
lib/openxml/docx/elements/numbering.rb

Instance Method Summary collapse

Methods included from HasProperties

included, #to_xml

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