Sha256: 15abd630d13a9d956d1210b931bdfad872a41195836611941913a0a43c37c36d

Contents?: true

Size: 1.31 KB

Versions: 37

Compression:

Stored size: 1.31 KB

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing <sharedItems> tag
  class SharedItems < OOXMLDocumentObject
    # @return [True, False] is contains_semi_mixed_types
    attr_reader :contains_semi_mixed_types
    # @return [True, False] is contains_string
    attr_reader :contains_string
    # @return [True, False] is contains_number
    attr_reader :contains_number
    # @return [True, False] is contains_integer
    attr_reader :contains_integer
    # @return [Integer] min value
    attr_reader :min_value
    # @return [Integer] max value
    attr_reader :max_value

    # Parse `<sharedItems>` tag
    # # @param [Nokogiri::XML:Element] node with WorksheetSource data
    # @return [sharedItems]
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'containsSemiMixedTypes'
          @contains_semi_mixed_types = attribute_enabled?(value)
        when 'containsString'
          @contains_string = attribute_enabled?(value)
        when 'containsNumber'
          @contains_number = attribute_enabled?(value)
        when 'containsInteger'
          @contains_integer = attribute_enabled?(value)
        when 'minValue'
          @min_value = value.value.to_i
        when 'maxValue'
          @max_value = value.value.to_i
        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_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.37.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.36.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.36.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.35.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.34.2 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.34.1 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.34.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.33.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.32.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.31.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.30.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.29.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.28.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.27.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.26.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.25.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.24.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.23.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb
ooxml_parser-0.22.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_cache/pivot_cache_definition/cache_fields/cache_field/shared_items.rb