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
Overview
Docx Custom Geometry
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
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(paths_list = [], parent: nil) ⇒ OOXMLCustomGeometry
Returns a new instance of OOXMLCustomGeometry.
9 10 11 12 |
# 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 |
Instance Attribute Details
#paths_list ⇒ Object
Returns the value of attribute paths_list.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/custom_geometry/ooxml_custom_geometry.rb', line 7 def paths_list @paths_list end |
Instance Method Details
#parse(node) ⇒ OOXMLCustomGeometry
Parse OOXMLCustomGeometry object
17 18 19 20 21 22 23 24 25 26 27 |
# 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 |