Sha256: 72637f39acc503f13586a96674b08ed56be0fab30b44c186dea7c5ca72aa68ad

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing <pageField> tag
  class PageField < OOXMLDocumentObject
    # @return [Integer] index of the field
    attr_accessor :field
    # @return [Integer]  index of the OLAP hierarchy
    attr_reader :hierarchy

    # Parse `<pageField>` tag
    # # @param [Nokogiri::XML:Element] node with PageField data
    # @return [PageField]
    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_fields/page_field.rb
ooxml_parser-0.37.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/page_fields/page_field.rb