class OoxmlParser::TableStyleProperties
Class for parsing ‘w:tblStylePr`
Attributes
cell_properties[RW]
@return [CellProperties] properties of table cell
paragraph_properties[RW]
@return [ParagraphProperties] properties of paragraph
run_properties[RW]
@return [RunProperties] properties of run
table_cell_properties[RW]
@return [CellProperties] properties of table cell
table_properties[RW]
@return [TableProperties] properties of table
table_row_properties[R]
@return [TableRowProperties] properties of table row
type[RW]
@return [Symbol] type of Table
Style Properties
Public Class Methods
new(type: nil, parent: nil)
click to toggle source
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
# 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
Public Instance Methods
parse(node)
click to toggle source
Parse table style property @param node [Nokogiri::XML::Element] node to parse @return [TableStyleProperties]
# 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