Class: Docx::Elements::Containers::TableRow

Inherits:
Object
  • Object
show all
Includes:
Container, Element
Defined in:
lib/docx/containers/table_row.rb

Constant Summary

Constants included from Element

Element::DEFAULT_TAG

Instance Attribute Summary

Attributes included from Element

#node

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Element

#append_to, #copy, #html_tag, included, #insert_after, #insert_before, #parent, #parent_paragraph, #prepend_to

Methods included from Container

#blank!, #properties, #remove!

Constructor Details

#initialize(node) ⇒ TableRow

Returns a new instance of TableRow.



15
16
17
18
# File 'lib/docx/containers/table_row.rb', line 15

def initialize(node)
  @node = node
  @properties_tag = ''
end

Class Method Details

.tagObject



11
12
13
# File 'lib/docx/containers/table_row.rb', line 11

def self.tag
  'tr'
end

Instance Method Details

#cellsObject

Array of cells contained within row



21
22
23
# File 'lib/docx/containers/table_row.rb', line 21

def cells
  @node.xpath('w:tc').map {|c_node| Containers::TableCell.new(c_node) }
end