Sha256: 840b163be9332530958cdc821e3c5085cb61096423a21ce2e21e99cf759cad3d

Contents?: true

Size: 504 Bytes

Versions: 6

Compression:

Stored size: 504 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class WordProcessingDrawingWrapCoordinate < Element
        namespace :wp

        attr_reader :tag

        attribute :x, expects: :integer
        attribute :y, expects: :integer

        def initialize(tag)
          raise ArgumentError, "Tag must be one of #{ok_tags.join(", ")}" unless ok_tags.include? tag
          @tag = tag
        end

      private

        def ok_tags
          %i(start lineTo)
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
openxml-docx-0.10.6 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.10.5 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.10.4 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.10.3 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.10.2 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.10.1 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb