Class: OoxmlParser::Series
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Series
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb
Overview
Class for parsing ‘c:ser` object
Instance Attribute Summary collapse
-
#categories ⇒ Categories
Categories of chart.
- #display_labels ⇒ DisplayLabelsProperties
-
#index ⇒ Index
Index of chart.
-
#order ⇒ Order
Order of chart.
-
#text ⇒ SeriesText
Text of series.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ Series
Parse Series.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#categories ⇒ Categories
Returns categories of chart.
14 15 16 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 14 def categories @categories end |
#display_labels ⇒ DisplayLabelsProperties
16 17 18 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 16 def display_labels @display_labels end |
#index ⇒ Index
Returns index of chart.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 8 def index @index end |
#order ⇒ Order
Returns order of chart.
10 11 12 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 10 def order @order end |
#text ⇒ SeriesText
Returns text of series.
12 13 14 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 12 def text @text end |
Instance Method Details
#parse(node) ⇒ Series
Parse Series
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/series.rb', line 21 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'idx' @index = SeriesIndex.new(parent: self).parse(node_child) when 'order' @order = Order.new(parent: self).parse(node_child) when 'tx' @text = SeriesText.new(parent: self).parse(node_child) when 'cat' @categories = Categories.new(parent: self).parse(node_child) when 'dLbls' @display_labels = DisplayLabelsProperties.new(parent: self).parse(node_child) end end self end |