Sha256: 3ec923e6f52fe42a3ad847758f1c4a2474637b942c6d5bf3c8877fb55c40d5da

Contents?: true

Size: 895 Bytes

Versions: 8

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

require_relative 'shape_adjust_value_list/shape_guide'
module OoxmlParser
  # Class for describing List of Shape Adjust Values
  class ShapeAdjustValueList < OOXMLDocumentObject
    # @return [Array] list of shape guides
    attr_accessor :shape_guides_list

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

    # @return [Array, Column] accessor for relationship
    def [](key)
      @shape_guides_list[key]
    end

    # Parse ShapeAdjustValueList
    # @param [Nokogiri::XML:Node] node with List of Shape Adjust Values
    # @return [ShapeAdjustValueList] result of parsing
    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
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ooxml_parser-0.8.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.8.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.7.2 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.7.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.7.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.6.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.5.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb
ooxml_parser-0.5.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/docx_shape_properties/preset_geometry/shape_adjust_value_list.rb