Sha256: 78b81bf4d11e20de7d4c5e6a64eaefbc7c3e02ac2c38e3616ec7c178ce851647

Contents?: true

Size: 985 Bytes

Versions: 40

Compression:

Stored size: 985 Bytes

Contents

# frozen_string_literal: true

require_relative 'string_cache/point'
module OoxmlParser
  # Class for parsing `c:tx`, `c:numCache` object
  class NumberStringCache < OOXMLDocumentObject
    # @return [String] Format Code
    attr_reader :format_code
    # @return [StringReference] String reference of series
    attr_reader :point_count
    # @return [Array, Point] array of points
    attr_reader :points

    def initialize(parent: nil)
      @points = []
      super
    end

    # Parse Order
    # @param [Nokogiri::XML:Node] node with Order
    # @return [Order] result of parsing
    def parse(node)
      node.xpath('*').each do |node_child|
        case node_child.name
        when 'formatCode'
          @format_code = node_child.text
        when 'ptCount'
          @point_count = ValuedChild.new(:integer, parent: self).parse(node_child)
        when 'pt'
          @points << Point.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ooxml_parser-0.21.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.20.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.19.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.18.1 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.18.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.17.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.16.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.15.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.14.2 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.14.1-mingw32 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.14.1 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.14.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.13.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.12.2 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.12.1 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.12.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.11.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.10.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.9.1 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
ooxml_parser-0.9.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb