Class: OoxmlParser::PivotTableStyleInfo
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::PivotTableStyleInfo
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb
Overview
Class for parsing <pivotTableStyleInfo> tag
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name of style.
-
#show_column_header ⇒ True, False
readonly
Show column header.
-
#show_column_stripes ⇒ True, False
readonly
Show column stripes.
-
#show_last_column ⇒ True, False
readonly
Show last column.
-
#show_row_header ⇒ True, False
readonly
Show row header.
-
#show_row_stripes ⇒ True, False
readonly
Show row stripes.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ PivotTableStyleInfo
Parse ‘<pivotTableStyleInfo>` tag.
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
#name ⇒ String (readonly)
Returns name of style.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 7 def name @name end |
#show_column_header ⇒ True, False (readonly)
Returns show column header.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 11 def show_column_header @show_column_header end |
#show_column_stripes ⇒ True, False (readonly)
Returns show column stripes.
15 16 17 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 15 def show_column_stripes @show_column_stripes end |
#show_last_column ⇒ True, False (readonly)
Returns show last column.
17 18 19 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 17 def show_last_column @show_last_column end |
#show_row_header ⇒ True, False (readonly)
Returns show row header.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 9 def show_row_header @show_row_header end |
#show_row_stripes ⇒ True, False (readonly)
Returns show row stripes.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 13 def show_row_stripes @show_row_stripes end |
Instance Method Details
#parse(node) ⇒ PivotTableStyleInfo
Parse ‘<pivotTableStyleInfo>` tag
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/pivot_table_definition/pivot_table_style_info.rb', line 22 def parse(node) node.attributes.each do |key, value| case key when 'name' @name = value.value.to_s when 'showRowHeaders' @show_row_header = attribute_enabled?(value) when 'showColHeaders' @show_column_header = attribute_enabled?(value) when 'showRowStripes' @show_row_stripes = attribute_enabled?(value) when 'showColStripes' @show_column_stripes = attribute_enabled?(value) when 'showLastColumn' @show_last_column = attribute_enabled?(value) end end self end |