Class: OoxmlParser::TableStyleElement

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/common_parser/common_data/table/properties/table_style_elements.rb

Constant Summary

Constants inherited from OOXMLDocumentObject

OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OOXMLDocumentObject

#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file

Constructor Details

#initializeTableStyleElement

Returns a new instance of TableStyleElement.



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

def initialize
  @cell_properties = CellProperties.new
end

Instance Attribute Details

#cell_propertiesObject

Returns the value of attribute cell_properties.



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

def cell_properties
  @cell_properties
end

Class Method Details

.parse(style_node) ⇒ Object



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

def self.parse(style_node)
  element_style = TableStyleElement.new
  style_node.xpath('*').each do |style_node_child|
    case style_node_child.name
    when 'tcPr'
      element_style.cell_properties = CellProperties.parse(style_node_child)
    end
  end
  element_style
end