Sha256: b5cd5f8aa39e6c9959d69cc8322e468c9dcaeb67e8e726c5be614ce21b3dd152

Contents?: true

Size: 581 Bytes

Versions: 37

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing <item> tag
  class Item < OOXMLDocumentObject
    # @return [Integer] index of item
    attr_reader :index
    # @return [Symbol] type of item
    attr_reader :type

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

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
ooxml_parser-0.37.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.37.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.36.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.36.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.35.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.34.2 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.34.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.34.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.33.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.32.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.31.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.30.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.29.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.28.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.27.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.26.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.25.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.24.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.23.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb
ooxml_parser-0.22.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/pivot_fields/pivot_field/items/item.rb