class OoxmlParser::StyleMatrixReference

Class for parsing ‘a:fillRef`, `a:effectRef`, `a:lnRef` tags

Attributes

index[R]

@return [Integer] Style Matrix Index

scheme_color[R]

@return [Color] scheme color of EffectReference

Public Instance Methods

parse(node) click to toggle source

Parse StyleMatrixReference object @param node [Nokogiri::XML:Element] node to parse @return [StyleMatrixReference] result of parsing

# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/docx_shape/shape_style/style_matrix_reference.rb, line 14
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