Sha256: b69b8bc5cc40bb836a4698382dfa2fbee2ec267a5a4e57a75dc8e0a7c50ddfa9

Contents?: true

Size: 683 Bytes

Versions: 6

Compression:

Stored size: 683 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class Numbering < OpenXml::Docx::Element
        include HasChildren, HasProperties
        tag :num

        def initialize(id)
          super()
          self.id = id
        end
        # TODO: child lvlOverride is limited to 9

        with_namespace :w do
          attribute :id, expects: :integer, displays_as: :numId#, required: true
        end

        value_property :abstract_numbering_id

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
openxml-docx-0.11.5 lib/openxml/docx/elements/numbering.rb
openxml-docx-0.11.4 lib/openxml/docx/elements/numbering.rb
openxml-docx-0.11.3 lib/openxml/docx/elements/numbering.rb
openxml-docx-0.11.2 lib/openxml/docx/elements/numbering.rb
openxml-docx-0.11.1 lib/openxml/docx/elements/numbering.rb
openxml-docx-0.11.0 lib/openxml/docx/elements/numbering.rb