class OoxmlParser::Item

Class for parsing <item> tag

Attributes

index[R]

@return [Integer] index of item

type[R]

@return [Symbol] type of item

Public Instance Methods

parse(node) click to toggle source

Parse `<item>` tag # @param [Nokogiri::XML:Element] node with Item data @return [item]

# File lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb, line 14
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'x'
      @index = value.value.to_i
    when 't'
      @type = value.value.to_sym
    end
  end
  self
end