class OoxmlParser::ColumnRowItems
Class for parsing <rowItems> and <colItems> tag
Attributes
@return [Integer] count of items
@return [Array<RowColumnItem>] list of RowColumnItem object
Public Class Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/column_row_items.rb, line 13 def initialize(parent: nil) @items = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/column_row_items.rb, line 19 def [](key) @items[key] end
@return [RowColumnItem] accessor
Source
# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/column_row_items.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 'i' @items << ColumnRowItem.new(parent: self).parse(node_child) end end self end
Parse ‘<cacheField>` tag # @param [Nokogiri::XML:Element] node with WorksheetSource
data @return [CacheField]