Class: OoxmlParser::SparklineGroups
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::SparklineGroups
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb
Overview
Class for ‘sparklineGroups` data
Instance Attribute Summary collapse
-
#sparklines_groups ⇒ Array<SparklineGroup>
readonly
List of sparkline group.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#[](key) ⇒ SparklineGroup
Accessor.
-
#initialize(parent: nil) ⇒ SparklineGroups
constructor
A new instance of SparklineGroups.
-
#parse(node) ⇒ SparklineGroups
Parse SparklineGroups data.
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) ⇒ SparklineGroups
Returns a new instance of SparklineGroups.
10 11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb', line 10 def initialize(parent: nil) @sparklines_groups = [] super end |
Instance Attribute Details
#sparklines_groups ⇒ Array<SparklineGroup> (readonly)
Returns list of sparkline group.
8 9 10 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb', line 8 def sparklines_groups @sparklines_groups end |
Instance Method Details
#[](key) ⇒ SparklineGroup
Returns accessor.
16 17 18 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb', line 16 def [](key) sparklines_groups[key] end |
#parse(node) ⇒ SparklineGroups
Parse SparklineGroups data
23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/extension_list/extension/sparkline_groups.rb', line 23 def parse(node) node.xpath('*').each do |column_node| case column_node.name when 'sparklineGroup' @sparklines_groups << SparklineGroup.new(parent: self).parse(column_node) end end self end |