Class: OpenXml::Docx::Elements::AbstractNumbering

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

Instance Method Summary collapse

Methods included from HasProperties

included, #to_xml

Constructor Details

#initialize(id) ⇒ AbstractNumbering

Returns a new instance of AbstractNumbering.


8
9
10
11
# File 'lib/openxml/docx/elements/abstract_numbering.rb', line 8

def initialize(id)
  super()
  self.id = id
end

Instance Method Details

#property_xml(xml) ⇒ Object

value_property :tmpl - this is a UI property and likely not worth implementing value_property :name value_property :style_link value_property :num_style_link


25
26
27
28
29
30
# File 'lib/openxml/docx/elements/abstract_numbering.rb', line 25

def property_xml(xml)
  props = properties.keys.map(&method(:send)).compact
  return if props.none?(&:render?)

  props.each { |prop| prop.to_xml(xml) }
end