class OoxmlParser::CacheFields
Class for parsing <cacheFields> tag
Attributes
@return [Array<CacheField>] list of CacheField
object
@return [Integer] count
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields.rb, line 13 def initialize(parent: nil) @cache_field = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields.rb, line 19 def [](key) @cache_field[key] end
@return [CacheField] accessor
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields.rb, line 26 def parse(node) node.attributes.each do |key, value| case key when 'count' @count = value.value.to_i end end node.xpath('*').each do |node_child| case node_child.name when 'cacheField' @cache_field << CacheField.new(parent: self).parse(node_child) end end self end
Parse ‘<cacheFields>` tag @param [Nokogiri::XML:Element] node with cacheFields data @return [cacheFields]