Sha256: d5cd9805b61ca582cf73009bb9eb37e7261e96a94d86fb6f57d68c0070b7d213

Contents?: true

Size: 570 Bytes

Versions: 3

Compression:

Stored size: 570 Bytes

Contents

module OpenXml
  module Docx
    module Properties
      class LineNumbering < ComplexProperty
        tag :lnNumType

        attribute :count_by, expects: :integer
        attribute :distance, expects: :positive_integer
        attribute :restart, expects: :valid_line_numbering_restart
        attribute :start, expects: :integer

        VALID_LINE_NUMBERING_RESTARTS = %i(continuous newPage newSection)

      private

        def valid_line_numbering_restart(value)
          valid_in? value, VALID_LINE_NUMBERING_RESTARTS
        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/line_numbering.rb
openxml-docx-0.8.0 lib/openxml/docx/properties/line_numbering.rb
openxml-docx-0.8.0.beta1 lib/openxml/docx/properties/line_numbering.rb