Class: OoxmlParser::DocxGroupedDrawing
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::DocxGroupedDrawing
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/group/docx_grouped_drawing.rb
Constant Summary
Constants inherited from OOXMLDocumentObject
OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#properties ⇒ Object
Returns the value of attribute properties.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(elements = []) ⇒ DocxGroupedDrawing
constructor
A new instance of DocxGroupedDrawing.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file
Constructor Details
#initialize(elements = []) ⇒ DocxGroupedDrawing
Returns a new instance of DocxGroupedDrawing.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/group/docx_grouped_drawing.rb', line 7 def initialize(elements = []) @elements = elements end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/group/docx_grouped_drawing.rb', line 5 def elements @elements end |
#properties ⇒ Object
Returns the value of attribute properties.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/group/docx_grouped_drawing.rb', line 5 def properties @properties end |
Class Method Details
.parse(grouping_node) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/group/docx_grouped_drawing.rb', line 11 def self.parse(grouping_node) grouping = DocxGroupedDrawing.new grouping_node.xpath('*').each do |grouping_node_child| case grouping_node_child.name when 'grpSpPr' grouping.properties = DocxShapeProperties.parse(grouping_node_child) when 'cNvGrpSpPr' when 'pic' element = DocxGroupElement.new(:picture) element.object = DocxPicture.parse(grouping_node_child) grouping.elements << element when 'wsp' element = DocxGroupElement.new(:shape) element.object = DocxShape.parse(grouping_node_child) grouping.elements << element when 'grpSp' element = parse(grouping_node_child) grouping.elements << element end end grouping end |