Sha256: 0511b2e26d9e48b4f6ff149d4afa0d5db2ff1a33c411901fdfcd11f4739759f2

Contents?: true

Size: 851 Bytes

Versions: 4

Compression:

Stored size: 851 Bytes

Contents

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

    def initialize(parent: nil)
      @points = []
      @parent = parent
    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 'ptCount'
          @point_count = PointCount.new(parent: self).parse(node_child)
        when 'pt'
          @points << Point.new(parent: self).parse(node_child)
        end
      end
      self
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb
ooxml_parser-0.4.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb
ooxml_parser-0.3.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb
ooxml_parser-0.2.0 lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb