Sha256: e98cb882476704cb72f0f6b94f519d4374bab32f8c6088046687d73682288cc1

Contents?: true

Size: 530 Bytes

Versions: 3

Compression:

Stored size: 530 Bytes

Contents

module OpenXml
  module Docx
    module Properties
      class Numbering < ComplexProperty
        tag :numPr

        attribute :level, expects: :positive_integer, displays_as: :ilvl
        attribute :id, expects: :positive_integer, displays_as: :numId

        def to_xml(xml)
          return unless render?
          xml["w"].public_send(tag) {
            xml_attributes.each do |tag_name, value|
              xml.public_send(tag_name, "w:val" => value)
            end
          }
        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openxml-docx-0.9.0 lib/openxml/docx/properties/numbering.rb
openxml-docx-0.8.0 lib/openxml/docx/properties/numbering.rb
openxml-docx-0.8.0.beta1 lib/openxml/docx/properties/numbering.rb