Sha256: 5470ddb940e237189717586ca8bc2a28d0f4599dde3a7ba3072dfb2d498d4dd1

Contents?: true

Size: 847 Bytes

Versions: 45

Compression:

Stored size: 847 Bytes

Contents

# frozen_string_literal: true

require_relative 'docx_blip/file_reference'
module OoxmlParser
  # Class for parsing `blipFill`
  class DocxBlip < OOXMLDocumentObject
    attr_accessor :path_to_media_file, :alpha_channel
    # @return [FileReference] image structure
    attr_accessor :file_reference

    alias path path_to_media_file

    # @return [String] result of convert of object to string
    def to_str
      path_to_media_file
    end

    # Parse DocxBlip object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [DocxBlip] result of parsing
    def parse(node)
      blip_node = node.xpath('a:blip', 'xmlns:a' => 'http://schemas.openxmlformats.org/drawingml/2006/main').first
      return self if blip_node.nil?

      @file_reference = FileReference.new(parent: self).parse(blip_node)
      self
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.37.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.36.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.36.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.35.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.34.2 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.34.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.34.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.33.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.32.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.31.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.30.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.29.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.28.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.27.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.26.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.25.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.24.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.23.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb
ooxml_parser-0.22.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/picture/docx_blip.rb