Class: OoxmlParser::TableRowProperties

Inherits:
OOXMLDocumentObject show all
Defined in:
lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb

Overview

Class for describing Table Row Properties

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

#initializeTableRowProperties

Returns a new instance of TableRowProperties.



7
8
9
# File 'lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb', line 7

def initialize
  @height = nil
end

Instance Attribute Details

#heightFloat

Returns Table Row Height.

Returns:

  • (Float)

    Table Row Height



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

def height
  @height
end

Class Method Details

.parse(node) ⇒ TableRowProperties

Parse Columns data

Parameters:

  • node (Nokogiri::XML:Element)

    with Table Row Properties data

Returns:



14
15
16
17
18
19
20
# File 'lib/ooxml_parser/common_parser/common_data/table/row/row/table_row_properties.rb', line 14

def self.parse(node)
  properties = TableRowProperties.new
  node.xpath('w:trHeight').each do |height|
    properties.height = height.attribute('val').value.to_f
  end
  properties
end