Sha256: 0c01065f6e8e97e20598a35ca2cd960be227efc6615cfc3fcabe34e65dbd338a

Contents?: true

Size: 521 Bytes

Versions: 3

Compression:

Stored size: 521 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class Break < Element
        tag :br

        attribute :clear, expects: :valid_clear
        attribute :type, expects: :valid_break_type

        VALID_CLEARS = %i(all left none right)
        VALID_BREAK_TYPES = %i(column page textWrapping)

      private

        def valid_clear(value)
          valid_in? value, VALID_CLEARS
        end

        def valid_break_type(value)
          valid_in? value, VALID_BREAK_TYPES
        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/elements/break.rb
openxml-docx-0.8.0 lib/openxml/docx/elements/break.rb
openxml-docx-0.8.0.beta1 lib/openxml/docx/elements/break.rb