Sha256: 41d82229cf8b17570fa15be1e28f5c78c19db59d7589620bbdf84e319a9253a7

Contents?: true

Size: 816 Bytes

Versions: 21

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing `a:effectRef` tags
  class EffectReference < OOXMLDocumentObject
    # @return [Integer] Style Matrix Index
    attr_reader :index
    # @return [Color] scheme color of EffectReference
    attr_reader :scheme_color

    # Parse EffectReference object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [EffectReference] result of parsing
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'idx'
          @index = value.value.to_f
        end
      end

      node.xpath('*').each do |node_child|
        case node_child.name
        when 'schemeClr'
          @scheme_color = Color.new(parent: self).parse_scheme_color(node_child)
        end
      end
      self
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ooxml_parser-0.22.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.21.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.20.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.19.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.18.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.18.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.17.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.16.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.15.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.14.2 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.14.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.14.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.13.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.12.2 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.12.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.12.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.11.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.10.0 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb
ooxml_parser-0.9.1 lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/effect_reference.rb