Sha256: e6a24a47687df446ed3b4ff45d03e5aedf900ada0f875247cf272891f47376c1
Contents?: true
Size: 1.2 KB
Versions: 6
Compression:
Stored size: 1.2 KB
Contents
module Axlsx # Conditional Format Rule color scale object # Describes a gradated color scale in this conditional formatting rule. # @note The recommended way to manage these rules is via Worksheet#add_conditional_formatting # @see Worksheet#add_conditional_formatting # @see ConditionalFormattingRule#initialize class ColorScale # A simple typed list of cfvos # @return [SimpleTypedList] # @see cfvo attr_reader :cfvos # A simple types list of colors # @return [SimpleTypedList] # @see Color attr_reader :colors def initializer initialize_cfvos initialize_colors yield self if block_given? end def add @cfvos << Cfvo.new(:type => :min, :val => 0) @colors << Color.new :rgb => "FF000000" {:cfvo => @cfvos.last, :color => @colors.last} end protected def initialize_cfvos @cfvos = SimpleTypedList.new Cfvo @cfvos.concat [Cfvo.new(:type => :min, :val => 0), Cfvo.new(:type => :max, :val => 0)] @cfvos.lock end def initialize_colors @colors = SimpleTypedList.new Color @colors.concat [Color.new(:rgb => "FFFF0000", Color.new(:rgb => "FF0000FF")] @colors.lock end end
Version data entries
6 entries across 6 versions & 1 rubygems