class OoxmlParser::Field

Class for parsing <field> tag

Attributes

field_index[RW]

@return [Integer] the index to a pivotField item value

Public Instance Methods

parse(node) click to toggle source

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

# File lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/row_fields/field.rb, line 12
def parse(node)
  node.attributes.each do |key, value|
    case key
    when 'x'
      @field_index = value.value.to_i
    end
  end
  self
end