Class: OoxmlParser::OOXMLCustomGeometry
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::OOXMLCustomGeometry
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb
Instance Attribute Summary collapse
-
#paths_list ⇒ Object
Returns the value of attribute paths_list.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(paths_list = [], parent: nil) ⇒ OOXMLCustomGeometry
constructor
A new instance of OOXMLCustomGeometry.
-
#parse(node) ⇒ OOXMLCustomGeometry
Parse OOXMLCustomGeometry object.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(paths_list = [], parent: nil) ⇒ OOXMLCustomGeometry
Returns a new instance of OOXMLCustomGeometry.
7 8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb', line 7 def initialize(paths_list = [], parent: nil) @paths_list = paths_list @parent = parent end |
Instance Attribute Details
#paths_list ⇒ Object
Returns the value of attribute paths_list.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb', line 5 def paths_list @paths_list end |
Instance Method Details
#parse(node) ⇒ OOXMLCustomGeometry
Parse OOXMLCustomGeometry object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb', line 15 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 |