class OoxmlParser::PageField

Class for parsing <pageField> tag

Attributes

field[RW]

@return [Integer] index of the field

hierarchy[R]

@return [Integer] index of the OLAP hierarchy

Public Instance Methods

parse(node) click to toggle source

Parse ‘<pageField>` tag # @param [Nokogiri::XML:Element] node with PageField data @return [PageField]

# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_fields/page_field.rb, line 14
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'fld'
      @field = value.value.to_i
    when 'hier'
      @hierarchy = value.value.to_i
    end
  end
  self
end