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(String))
Header rows of the table (optional)
-
#header=(header : Array(Array(String)))
Header rows of the table (optional)
-
#rows : Array(Array(String))
Data rows of the table
-
#rows=(rows : Array(Array(String)))
Data rows of the table
Constructor Detail
def self.new(header : Array(Array(String)) = [] of Array(String), rows : Array(Array(String)) = [] of Array(String))
#