class OoxmlParser::OldDocxShapeFill

Fallback DOCX shape fill properties

Attributes

file_reference[RW]

@return [FileReference] image structure

opacity[RW]
stretching_type[RW]
title[RW]

Public Instance Methods

parse(node) click to toggle source

Parse OldDocxShapeFill object @param node [Nokogiri::XML:Element] node to parse @return [OldDocxShapeFill] result of parsing

# File lib/ooxml_parser/common_parser/common_data/alternate_content/picture/shape/old_docx_shape_fill.rb, line 13
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'id'
      @file_reference = FileReference.new(parent: self).parse(node)
    when 'type'
      @stretching_type = case value.value
                         when 'frame'
                           :stretch
                         else
                           value.value.to_sym
                         end
    when 'title'
      @title = value.value.to_s
    end
  end
  self
end