Sha256: ed2222e7b72364a3987ea031d195a802e64c486afed68b98d629a97671c8fca1
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
module OoxmlParser # Class for parsing `grpSp` class ShapesGrouping < OOXMLDocumentObject attr_accessor :elements, :properties def initialize(parent: nil) @elements = [] @parent = parent end # Parse ShapesGrouping object # @param node [Nokogiri::XML:Element] node to parse # @return [ShapesGrouping] result of parsing def parse(node) node.xpath('*').each do |child_node| case child_node.name when 'cxnSp' @elements << ConnectionShape.new(parent: self).parse(child_node) when 'grpSpPr' @properties = DocxShapeProperties.new(parent: self).parse(child_node) when 'pic' @elements << DocxPicture.new(parent: self).parse(child_node) when 'sp' @elements << DocxShape.new(parent: self).parse(child_node).dup when 'grpSp' @elements << ShapesGrouping.new(parent: self).parse(child_node) when 'graphicFrame' @elements << GraphicFrame.new(parent: self).parse(child_node) when 'wsp' @elements << DocxShape.new(parent: self).parse(child_node) end end self end end end
Version data entries
3 entries across 3 versions & 1 rubygems