class OoxmlParser::OOXMLCustomGeometry

Docx Custom Geometry

Attributes

paths_list[RW]

Public Class Methods

new(paths_list = [], parent: nil) click to toggle source
Calls superclass method
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb, line 9
def initialize(paths_list = [], parent: nil)
  @paths_list = paths_list
  super(parent: parent)
end

Public Instance Methods

parse(node) click to toggle source

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

# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb, line 17
def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'pathLst'
      node_child.xpath('a:path', 'xmlns:a' => 'http://schemas.openxmlformats.org/drawingml/2006/main').each do |path_node|
        @paths_list << DocxShapeLinePath.new(parent: self).parse(path_node)
      end
    end
  end
  self
end