class OoxmlParser::DocxShapeLineElement
Docx Shape
Line Element
Attributes
Public Class Methods
Source
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/docx_custom_geometry/docx_shape_line_path/docx_shape_line_element.rb, line 8 def initialize(points = [], parent: nil) @points = points super(parent: parent) end
Calls superclass method
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/docx_custom_geometry/docx_shape_line_path/docx_shape_line_element.rb, line 16 def parse(node) case node.name when 'moveTo' @type = :move when 'lnTo' @type = :line when 'arcTo' @type = :arc when 'cubicBezTo' @type = :cubic_bezier when 'close' @type = :close end node.xpath('*').each do |node_child| case node_child.name when 'pt' @points << OOXMLCoordinates.new(parent: self).parse(node_child) end end self end
Parse DocxShapeLineElement
@param [Nokogiri::XML:Node] node with DocxShapeLineElement
@return [DocxShapeLineElement] result of parsing