Sha256: 670bdd2642399f59e8dcdfadecc586eea4917c58e6b0dcec078a4373f7574152

Contents?: true

Size: 751 Bytes

Versions: 3

Compression:

Stored size: 751 Bytes

Contents

module OpenXml
  module Docx
    module Properties
      class Spacing < ComplexProperty
        VALID_LINE_RULES = %i(atLeast auto exact)

        attribute :after, expects: :positive_integer
        attribute :after_auto, expects: :on_or_off, displays_as: :afterAutospacing
        attribute :after_lines, expects: :integer
        attribute :before, expects: :positive_integer
        attribute :before_auto, expects: :on_or_off, displays_as: :beforeAutospacing
        attribute :before_lines, expects: :integer
        attribute :line, expects: :integer
        attribute :line_rule, expects: :valid_line_rule

      private

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