Class: OoxmlParser::StringCache
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::StringCache
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb
Overview
Class for parsing ‘c:tx` object
Instance Attribute Summary collapse
-
#point_count ⇒ StringReference
String reference of series.
-
#points ⇒ Array, Point
Array of points.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ StringCache
constructor
A new instance of StringCache.
-
#parse(node) ⇒ Order
Parse Order.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ StringCache
Returns a new instance of StringCache.
11 12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb', line 11 def initialize(parent: nil) @points = [] @parent = parent end |
Instance Attribute Details
#point_count ⇒ StringReference
Returns String reference of series.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb', line 7 def point_count @point_count end |
#points ⇒ Array, Point
Returns array of points.
9 10 11 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb', line 9 def points @points end |
Instance Method Details
#parse(node) ⇒ Order
Parse Order
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/string_cache.rb', line 19 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 |