class Docx::Elements::Containers::TableCell
Public Class Methods
new(node)
click to toggle source
# File lib/docx/containers/table_cell.rb, line 15 def initialize(node) @node = node @properties_tag = 'tcPr' end
tag()
click to toggle source
# File lib/docx/containers/table_cell.rb, line 11 def self.tag 'tc' end
Public Instance Methods
each_paragraph() { |tr| ... }
click to toggle source
Iterate over each text run within a paragraph's cell
# File lib/docx/containers/table_cell.rb, line 31 def each_paragraph paragraphs.each { |tr| yield(tr) } end
paragraphs()
click to toggle source
Array of paragraphs contained within cell
# File lib/docx/containers/table_cell.rb, line 26 def paragraphs @node.xpath('w:p').map {|p_node| Containers::Paragraph.new(p_node) } end
to_s()
click to toggle source
Return text of paragraph's cell
# File lib/docx/containers/table_cell.rb, line 21 def to_s paragraphs.map(&:text).join('') end
Also aliased as: text