Sha256: d6e5a5f0e30a160df370bd65ca3e0be52a95b52fae1723a5c68faf18ca3a765e

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 Bytes

Contents

module Axlsx
  # A simple, self serializing class for storing conditional formattings
  class ConditionalFormattings < SimpleTypedList
    # creates a new Tables object
    def initialize(worksheet)
      raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet)

      super ConditionalFormatting
      @worksheet = worksheet
    end

    # The worksheet that owns this collection of tables
    # @return [Worksheet]
    attr_reader :worksheet

    # serialize the conditional formattings
    def to_xml_string(str = "")
      return if empty?

      each { |item| item.to_xml_string(str) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caxlsx-3.4.1 lib/axlsx/workbook/worksheet/conditional_formattings.rb
caxlsx-3.4.0 lib/axlsx/workbook/worksheet/conditional_formattings.rb