Class: OoxmlParser::TableLayout
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TableLayout
- Defined in:
- lib/ooxml_parser/common_parser/common_data/table/properties/table_layout.rb
Overview
Class for parsing ‘w:tblLayout` object Whether a table uses a fixed width or autofit method for laying out the table contents is specified with the <w:tblLayout> element within the <w:tblPr> element. If <w:tblLayout> is omitted, autofit is assumed.
Instance Attribute Summary collapse
-
#type ⇒ Symbol
Specifies the method of laying out the contents of the table.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#parse(node) ⇒ TableLayout
Parse TableLayout.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, #initialize, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
This class inherits a constructor from OoxmlParser::OOXMLDocumentObject
Instance Attribute Details
#type ⇒ Symbol
Returns Specifies the method of laying out the contents of the table.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_layout.rb', line 8 def type @type end |
Instance Method Details
#parse(node) ⇒ TableLayout
Parse TableLayout
13 14 15 16 17 18 19 20 21 |
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_layout.rb', line 13 def parse(node) node.attributes.each do |key, value| case key when 'type' @type = value.value.to_sym end end self end |