Class: OoxmlParser::NumberStringCache
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::NumberStringCache
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb
Overview
Class for parsing ‘c:tx`, `c:numCache` object
Instance Attribute Summary collapse
-
#format_code ⇒ String
readonly
Format Code.
-
#point_count ⇒ StringReference
readonly
String reference of series.
-
#points ⇒ Array, Point
readonly
Array of points.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ NumberStringCache
constructor
A new instance of NumberStringCache.
-
#parse(node) ⇒ Order
Parse Order.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(parent: nil) ⇒ NumberStringCache
Returns a new instance of NumberStringCache.
14 15 16 17 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb', line 14 def initialize(parent: nil) @points = [] super end |
Instance Attribute Details
#format_code ⇒ String (readonly)
Returns Format Code.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb', line 8 def format_code @format_code end |
#point_count ⇒ StringReference (readonly)
Returns String reference of series.
10 11 12 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb', line 10 def point_count @point_count end |
#points ⇒ Array, Point (readonly)
Returns array of points.
12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb', line 12 def points @points end |
Instance Method Details
#parse(node) ⇒ Order
Parse Order
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series/series_text/string_reference/number_string_cache.rb', line 22 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 |