Class: OoxmlParser::TableColumn
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableColumn
- Defined in:
- lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb
Overview
Class for ‘tableColumn` tag data
Instance Attribute Summary collapse
-
#id ⇒ Integer
readonly
Id of table column.
-
#name ⇒ String
readonly
Name.
-
#totals_row_function ⇒ String
readonly
Total row function.
-
#totals_row_label ⇒ String
readonly
Total row label.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TableColumn
Parse Table Column 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
#id ⇒ Integer (readonly)
Returns id of table column.
7 8 9 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb', line 7 def id @id end |
#name ⇒ String (readonly)
Returns name.
9 10 11 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb', line 9 def name @name end |
#totals_row_function ⇒ String (readonly)
Returns total row function.
13 14 15 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb', line 13 def totals_row_function @totals_row_function end |
#totals_row_label ⇒ String (readonly)
Returns total row label.
11 12 13 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb', line 11 def totals_row_label @totals_row_label end |
Instance Method Details
#parse(node) ⇒ TableColumn
Parse Table Column data
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ooxml_parser/xlsx_parser/workbook/worksheet/table_part/table_columns/table_column.rb', line 18 def parse(node) node.attributes.each do |key, value| case key when 'id' @id = value.value.to_i when 'name' @name = value.value.to_s when 'totalsRowLabel' @totals_row_label = value.value.to_s when 'totalsRowFunction' @totals_row_function = value.value.to_s end end self end |