Class: OoxmlParser::PivotFormats
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::PivotFormats
- Defined in:
- lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb
Overview
Parsing chart ‘c:pivotFmts`
Instance Attribute Summary collapse
-
#pivot_formats_list ⇒ Array<PivotFormat>
readonly
List of pivot formats.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#[](key) ⇒ Array, PivotFormat
Accessor.
-
#initialize(parent: nil) ⇒ PivotFormats
constructor
A new instance of PivotFormats.
-
#parse(node) ⇒ PivotFormats
Parse PivotFormats object.
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) ⇒ PivotFormats
Returns a new instance of PivotFormats.
10 11 12 13 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb', line 10 def initialize(parent: nil) @pivot_formats_list = [] super end |
Instance Attribute Details
#pivot_formats_list ⇒ Array<PivotFormat> (readonly)
Returns list of pivot formats.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb', line 8 def pivot_formats_list @pivot_formats_list end |
Instance Method Details
#[](key) ⇒ Array, PivotFormat
Returns accessor.
16 17 18 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb', line 16 def [](key) @pivot_formats_list[key] end |
#parse(node) ⇒ PivotFormats
Parse PivotFormats object
23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/common_parser/common_data/alternate_content/chart/chart/pivot_formats.rb', line 23 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'pivotFmt' @pivot_formats_list << PivotFormat.new(parent: self).parse(node_child) end end self end |