class OoxmlParser::CustomFilters
Class for ‘CustomFilters` data
Attributes
@return [Integer] and value
@return [Array<CustomFilter>] list of filters array
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter/filter_column/custom_filters.rb, line 12 def initialize(parent: nil) @filters_array = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter/filter_column/custom_filters.rb, line 18 def [](key) @filters_array[key] end
@return [Array, CustomFilter] accessor
Source
# File lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/autofilter/filter_column/custom_filters.rb, line 25 def parse(node) node.attributes.each do |key, value| case key when 'and' @and = value.value.to_i end end node.xpath('*').each do |node_child| case node_child.name when 'customFilter' @filters_array << CustomFilter.new(parent: self).parse(node_child) end end self end
Parse CustomFilters
data @param [Nokogiri::XML:Element] node with CustomFilters
data @return [CustomFilters] value of CustomFilters
data