Sha256: 43a5b1124271ebcf25f425a485392bdbae270b041ba37cdb6817a763bbb5215e

Contents?: true

Size: 1023 Bytes

Versions: 28

Compression:

Stored size: 1023 Bytes

Contents

# frozen_string_literal: true

require_relative 'conditional_formattings/conditional_formatting'
module OoxmlParser
  # Class for `conditionalFormattings` data
  class ConditionalFormattings < OOXMLDocumentObject
    # @return [Array<ConditionalFormatting>] list of conditional formattings
    attr_reader :conditional_formattings_list

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

    # @return [Array, ConditionalFormatting] accessor
    def [](key)
      @conditional_formattings_list[key]
    end

    # Parse ConditionalFormattings data
    # @param [Nokogiri::XML:Element] node with ConditionalFormattings data
    # @return [ConditionalFormattings] value of ConditionalFormattings data
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'conditionalFormatting'
          @conditional_formattings_list << ConditionalFormatting.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.37.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.36.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.36.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.35.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.34.2 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.34.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.34.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.33.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.32.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.31.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.30.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.29.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.28.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.27.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.26.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.25.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.24.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.23.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
ooxml_parser-0.22.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb