class OoxmlParser::OldDocxPicture

Fallback DOCX Picture

Attributes

data[RW]
type[RW]

Public Instance Methods

parse(node) click to toggle source

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

# File lib/ooxml_parser/common_parser/common_data/alternate_content/picture/old_docx_picture.rb, line 14
def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'shape'
      @type = :shape
      @data = OldDocxShape.new(parent: self).parse(node_child)
    when 'group'
      @type = :group
      @data = OldDocxGroup.new(parent: self).parse(node_child)
    end
  end
  self
end