Class: OoxmlParser::PivotCache
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::PivotCache
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb
Overview
Class for parsing <pivotCache> tag
Instance Attribute Summary collapse
-
#cache_id ⇒ Integer
readonly
CacheId of pivot cache.
-
#id ⇒ String
readonly
Id of pivot cache.
-
#pivot_cache_definition ⇒ PivotCacheDefinition
readonly
Parsed pivot cache definition.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ PivotCache
Parse Pivot Cache data.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #initialize, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#cache_id ⇒ Integer (readonly)
Returns cacheId of pivot cache.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb', line 9 def cache_id @cache_id end |
#id ⇒ String (readonly)
Returns id of pivot cache.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb', line 11 def id @id end |
#pivot_cache_definition ⇒ PivotCacheDefinition (readonly)
Returns parsed pivot cache definition.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb', line 13 def pivot_cache_definition @pivot_cache_definition end |
Instance Method Details
#parse(node) ⇒ PivotCache
Parse Pivot Cache data
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_cache.rb', line 18 def parse(node) node.attributes.each do |key, value| case key when 'cacheId' @cache_id = value.value.to_i when 'id' @id = value.value.to_s end end parse_pivot_cache_definition self end |