Class: Coradoc::AsciiDoc::Model::TableRow

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/asciidoc/model/table_row.rb

Instance Attribute Summary

Attributes inherited from Base

#id

Instance Method Summary collapse

Methods inherited from Base

#block_level?, #inline?, #serialize_content, #simplify_block_content, #to_adoc, #to_h, visit, #visit

Instance Method Details

#asciidoc?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/coradoc/asciidoc/model/table_row.rb', line 14

def asciidoc?
  columns&.any? { |c| c.is_a?(Coradoc::AsciiDoc::Model::TableCell) && c.asciidoc? } || false
end

#table_header_row?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/coradoc/asciidoc/model/table_row.rb', line 10

def table_header_row?
  header
end

#underline_forObject

NOTE: underline_for provides trailing newline for table row serialization. The method name follows AsciiDoc table formatting conventions.



20
21
22
# File 'lib/coradoc/asciidoc/model/table_row.rb', line 20

def underline_for
  "\n"
end