Class: OoxmlParser::FilterColumn
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::FilterColumn
- Defined in:
- lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb
Overview
Class for ‘filterColumn` data The filterColumn collection identifies a particular column in the AutoFilter range and specifies filter information that has been applied to this column.
Instance Attribute Summary collapse
-
#show_button ⇒ True, False
Flag indicating whether the filter button is visible.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ FilterColumn
constructor
A new instance of FilterColumn.
-
#parse(node) ⇒ FilterColumn
Parse FilterColumn data.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ FilterColumn
Returns a new instance of FilterColumn.
10 11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb', line 10 def initialize(parent: nil) @show_button = true @parent = parent end |
Instance Attribute Details
#show_button ⇒ True, False
Returns Flag indicating whether the filter button is visible.
8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb', line 8 def @show_button end |
Instance Method Details
#parse(node) ⇒ FilterColumn
Parse FilterColumn data
18 19 20 21 22 23 24 25 26 |
# File 'lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/worksheet/table_part/autofilter/filter_column.rb', line 18 def parse(node) node.attributes.each do |key, value| case key when 'showButton' @show_button = attribute_enabled?(value) end end self end |