class OoxmlParser::IconSet
Class for ‘iconSet` data
Attributes
@return [Symbol] Specifies whether icon set is custom
@return [Array<ConditionalFormattingIcon>] list of icons for custom sets
@return [Symbol] Specifies whether icons are shown in reverse order
@return [Symbol] Specifies whether value is shown in a cell
@return [Array<ConditionalFormatValueObject>] list of values
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/icon_set.rb, line 20 def initialize(parent: nil) @values = [] @icons = [] @show_value = true super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings/conditional_formatting/conditional_formatting_rule/icon_set.rb, line 30 def parse(node) node.attributes.each do |key, value| case key when 'iconSet' @set = value.value.to_s when 'reverse' @reverse = attribute_enabled?(value) when 'showValue' @show_value = attribute_enabled?(value) when 'custom' @custom = attribute_enabled?(value) end end node.xpath('*').each do |node_child| case node_child.name when 'cfvo' @values << ConditionalFormatValueObject.new(parent: self).parse(node_child) when 'cfIcon' @icons << ConditionalFormattingIcon.new(parent: self).parse(node_child) end end self end
Parse IconSet
data @param [Nokogiri::XML:Element] node with IconSet
data @return [IconSet] value of IconSet
data