Class: OoxmlParser::TableElement

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxml_parser/common_parser/common_data/table/properties/table_element.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#cell_styleObject Also known as: cell_properties

Returns the value of attribute cell_style.



5
6
7
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_element.rb', line 5

def cell_style
  @cell_style
end

Class Method Details

.parse(whole_table_node) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/ooxml_parser/common_parser/common_data/table/properties/table_element.rb', line 9

def self.parse(whole_table_node)
  table_element = TableElement.new
  whole_table_node.xpath('*').each do |whole_table_node_child|
    case whole_table_node_child.name
    when 'tcStyle', 'tcPr'
      table_element.cell_style = CellProperties.parse(whole_table_node_child)
    end
  end
  table_element
end