class OoxmlParser::PageFields
Class for parsing <pageFields> tag
Attributes
@return [Integer] count
@return [Array<PageField>] list of PageField
object
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_fields.rb, line 13 def initialize(parent: nil) @page_field = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_fields.rb, line 19 def [](key) @page_field[key] end
@return [PageField] accessor
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_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 'pageField' @page_field << PageField.new(parent: self).parse(node_child) end end self end
Parse ‘<pageFields>` tag @param [Nokogiri::XML:Element] node with pageFields data @return [PageFields]