Class: OoxmlParser::ConditionalFormattings
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::ConditionalFormattings
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb
Overview
Class for ‘conditionalFormattings` data
Instance Attribute Summary collapse
-
#conditional_formattings_list ⇒ Array<ConditionalFormatting>
readonly
List of conditional formattings.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#[](key) ⇒ Array, ConditionalFormatting
Accessor.
-
#initialize(parent: nil) ⇒ ConditionalFormattings
constructor
A new instance of ConditionalFormattings.
-
#parse(node) ⇒ ConditionalFormattings
Parse ConditionalFormattings data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ ConditionalFormattings
Returns a new instance of ConditionalFormattings.
10 11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb', line 10 def initialize(parent: nil) @conditional_formattings_list = [] super end |
Instance Attribute Details
#conditional_formattings_list ⇒ Array<ConditionalFormatting> (readonly)
Returns list of conditional formattings.
8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb', line 8 def conditional_formattings_list @conditional_formattings_list end |
Instance Method Details
#[](key) ⇒ Array, ConditionalFormatting
Returns accessor.
16 17 18 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb', line 16 def [](key) @conditional_formattings_list[key] end |
#parse(node) ⇒ ConditionalFormattings
Parse ConditionalFormattings data
23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/conditional_formattings.rb', line 23 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 |