Sha256: 2ed3263358cf366b8074d74b296615805ad0bb2e87469123d3f7d96daceaff17

Contents?: true

Size: 519 Bytes

Versions: 7

Compression:

Stored size: 519 Bytes

Contents

module OpenXml
  module Docx
    module Elements
      class WordProcessingDrawingWrapCoordinate < OpenXml::Docx::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

7 entries across 7 versions & 1 rubygems

Version Path
openxml-docx-0.11.5 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.4 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.3 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.2 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.1 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.0 lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
openxml-docx-0.11.0.rc lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb