Class: Markbridge::AST::TableRow

Inherits:
Element show all
Defined in:
lib/markbridge/ast/table.rb

Overview

Represents a table row containing cells.

Examples:

row = AST::TableRow.new
row << AST::TableCell.new

Instance Attribute Summary

Attributes inherited from Element

#children

Instance Method Summary collapse

Methods inherited from Element

#initialize

Constructor Details

This class inherits a constructor from Markbridge::AST::Element

Instance Method Details

#<<(child) ⇒ TableRow

Add a child node to the row. Whitespace-only Text nodes are ignored.

Parameters:

  • child (Node)

    the node to add

Returns:



34
35
36
37
38
# File 'lib/markbridge/ast/table.rb', line 34

def <<(child)
  return self if child.is_a?(Text) && child.text.strip.empty?

  super
end