Sha256: 2293f82812af1ef2682978bd0af60d9816b6a750fcf7515d982a57b28405f7c2

Contents?: true

Size: 974 Bytes

Versions: 29

Compression:

Stored size: 974 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for parsing <location> tag
  class Location < OOXMLDocumentObject
    # @return [String] ref of location
    attr_reader :ref
    # @return [True, False] first header row
    attr_reader :first_header_row
    # @return [True, False] first data row
    attr_reader :first_data_row
    # @return [True, False] first data column
    attr_reader :first_data_column

    # Parse `<location>` tag
    # @param [Nokogiri::XML:Element] node with location data
    # @return [Location]
    def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'ref'
          @ref = value.value.to_s
        when 'firstHeaderRow'
          @first_header_row = attribute_enabled?(value)
        when 'firstDataRow'
          @first_data_row = attribute_enabled?(value)
        when 'firstDataCol'
          @first_data_column = attribute_enabled?(value)
        end
      end
      self
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ooxml_parser-0.33.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.32.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.31.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.30.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.29.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.28.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.27.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.26.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.25.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.24.0 lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/location.rb
ooxml_parser-0.23.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.22.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.21.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.20.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.19.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.18.1 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.18.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.17.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.16.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb
ooxml_parser-0.15.0 lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/pivot_table_definition/location.rb