class OoxmlParser::TableGrid
Class for parsing ‘w:tblGrid` object
Attributes
@return [Array, GridColumn] array of columns
Public Class Methods
Source
# File lib/ooxml_parser/common_parser/common_data/table/table_grid.rb, line 10 def initialize(parent: nil) @columns = [] super end
Calls superclass method
OoxmlParser::OOXMLDocumentObject::new
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/table/table_grid.rb, line 18 def ==(other) @columns.each_with_index do |cur_column, index| return false unless cur_column == other.columns[index] end true end
Compare this object to other @param other [Object] any other object @return [True, False] result of comparision
Source
# File lib/ooxml_parser/common_parser/common_data/table/table_grid.rb, line 28 def parse(node) node.xpath('*').each do |grid_child| case grid_child.name when 'gridCol' @columns << GridColumn.new(parent: self).parse(grid_child) end end self end
Parse TableGrid
@param [Nokogiri::XML:Node] node with TableGrid
@return [TableGrid] result of parsing