Class: OoxmlParser::ShapeAdjustValueList

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb

Overview

Class for describing List of Shape Adjust Values

Instance Attribute Summary collapse

Attributes inherited from OOXMLDocumentObject

#parent

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, #boolean_attribute_value, #parse_xml, #with_data?

Methods included from OoxmlObjectAttributeHelper

#attribute_enabled?, #option_enabled?

Methods included from OoxmlDocumentObjectHelper

#to_hash

Constructor Details

#initialize(parent: nil) ⇒ ShapeAdjustValueList

Returns a new instance of ShapeAdjustValueList.



10
11
12
13
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb', line 10

def initialize(parent: nil)
  @shape_guides_list = []
  super
end

Instance Attribute Details

#shape_guides_listArray

Returns list of shape guides.

Returns:

  • (Array)

    list of shape guides



8
9
10
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb', line 8

def shape_guides_list
  @shape_guides_list
end

Instance Method Details

#[](key) ⇒ Array, Column

Returns accessor for relationship.

Returns:

  • (Array, Column)

    accessor for relationship



16
17
18
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb', line 16

def [](key)
  @shape_guides_list[key]
end

#parse(node) ⇒ ShapeAdjustValueList

Parse ShapeAdjustValueList

Parameters:

  • node (Nokogiri::XML:Node)

    with List of Shape Adjust Values

Returns:



23
24
25
26
27
28
29
30
31
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb', line 23

def parse(node)
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'gd'
      @shape_guides_list << ShapeGuide.new(parent: self).parse(node_child)
    end
  end
  self
end