Class: Uniword::Wordprocessingml::TableCell

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/wordprocessingml/table_cell.rb

Overview

Table cell

Generated from OOXML schema: wordprocessingml.yml Element: <w:tc>

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#headerObject

Non-serialized runtime flag: true if this cell originated from <th>



18
19
20
# File 'lib/uniword/wordprocessingml/table_cell.rb', line 18

def header
  @header
end

Instance Method Details

#accept(visitor) ⇒ Object

Accept visitor



38
39
40
# File 'lib/uniword/wordprocessingml/table_cell.rb', line 38

def accept(visitor)
  visitor.visit_table_cell(self)
end

#textString

Get cell text content

Returns:

  • (String)

    Combined text from all paragraphs



45
46
47
# File 'lib/uniword/wordprocessingml/table_cell.rb', line 45

def text
  paragraphs.map(&:text).join("\n")
end