class
Crst::Table
- Crst::Table
- Crst::Node
- Reference
- Object
Overview
Represents a table with header and data rows
Tables can be created from simple tables, grid tables, or list-table directives in RST. Each cell contains plain text.
Example:
# RST list-table:
# .. list-table::
# :header-rows: 1
#
# * - Name
# - Age
# * - Alice
# - 30
table = Crst::Table.new
table.header = [["Name", "Age"]]
table.rows = [["Alice", "30"], ["Bob", "25"]]
Defined in:
crst/nodes.crConstructors
Instance Method Summary
-
#header : Array(Array(Array(Node)))
Header rows of the table (optional), each cell is pre-parsed inline nodes
-
#header=(header : Array(Array(Array(Node))))
Header rows of the table (optional), each cell is pre-parsed inline nodes
-
#rows : Array(Array(Array(Node)))
Data rows of the table, each cell is pre-parsed inline nodes
-
#rows=(rows : Array(Array(Array(Node))))
Data rows of the table, each cell is pre-parsed inline nodes
Constructor Detail
def self.new(header : Array(Array(Array(Crst::Node))) = [] of Array(Array(Node)), rows : Array(Array(Array(Crst::Node))) = [] of Array(Array(Node)))
#
Instance Method Detail
Header rows of the table (optional), each cell is pre-parsed inline nodes
Header rows of the table (optional), each cell is pre-parsed inline nodes
Data rows of the table, each cell is pre-parsed inline nodes
Data rows of the table, each cell is pre-parsed inline nodes