Class: Uniword::Wordprocessingml::TableRow

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

Overview

Table row

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#headerObject

Header flag for table rows (not serialized, runtime only)



25
26
27
# File 'lib/uniword/wordprocessingml/table_row.rb', line 25

def header
  @header
end

Instance Method Details

#accept(visitor) ⇒ void

This method returns an undefined value.

Accept a visitor (Visitor pattern)

Parameters:

  • visitor (BaseVisitor)

    The visitor to accept



58
59
60
# File 'lib/uniword/wordprocessingml/table_row.rb', line 58

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

#cell_countInteger

Get cell count

Returns:

  • (Integer)

    Number of cells in row



50
51
52
# File 'lib/uniword/wordprocessingml/table_row.rb', line 50

def cell_count
  cells.count
end

#header?Boolean

Predicate for header flag

Returns:

  • (Boolean)


28
29
30
# File 'lib/uniword/wordprocessingml/table_row.rb', line 28

def header?
  !!@header
end