Sha256: 377b3c74609bfd654987d461923dd68bc58d8ba747da18d7b07b6b412e91af48

Contents?: true

Size: 722 Bytes

Versions: 19

Compression:

Stored size: 722 Bytes

Contents

# frozen_string_literal: true

module OoxmlParser
  # Class for `sparkline` data
  class Sparkline < OOXMLDocumentObject
    # @return [String] reference to source range of sparkline
    attr_reader :source_reference
    # @return [String] reference to destination range of sparkline
    attr_reader :destination_reference

    # Parse Sparkline
    # @param [Nokogiri::XML:Node] node with Sparkline
    # @return [Sparkline] result of parsing
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'f'
          @source_reference = node_child.text
        when 'sqref'
          @destination_reference = node_child.text
        end
      end
      self
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ooxml_parser-0.38.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.37.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.37.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.36.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.36.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.35.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.34.2 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.34.1 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.34.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.33.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.32.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.31.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.30.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.29.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.28.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.27.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.26.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.25.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb
ooxml_parser-0.24.0 lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups/sparkline_group/sparklines/sparkline.rb