class OoxmlParser::TableStyleProperties
Class for parsing ‘w:tblStylePr`
Attributes
@return [CellProperties] properties of table cell
@return [ParagraphProperties] properties of paragraph
@return [RunProperties] properties of run
@return [CellProperties] properties of table cell
@return [TableProperties] properties of table
@return [TableRowProperties] properties of table row
Public Class Methods
Source
# File lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties.rb, line 22 def initialize(type: nil, parent: nil) @type = type @run_properties = nil @table_cell_properties = CellProperties.new super(parent: parent) end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/table/properties/table_style_properties.rb, line 32 def parse(node) node.attributes.each do |key, value| case key when 'type' @type = value.value.to_sym end end node.xpath('*').each do |node_child| case node_child.name when 'rPr' @run_properties = RunProperties.new(parent: self).parse(node_child) when 'tcPr' @table_cell_properties = CellProperties.new(parent: self).parse(node_child) when 'tblPr' @table_properties = TableProperties.new(parent: self).parse(node_child) when 'trPr' @table_row_properties = TableRowProperties.new(parent: self).parse(node_child) when 'pPr' @paragraph_properties = ParagraphProperties.new(parent: self).parse(node_child) end end self end
Parse table style property @param node [Nokogiri::XML::Element] node to parse @return [TableStyleProperties]