Table type

Holds tabular data

Direct parent types

Eachable1
Eachable which each() calls the callback with one argument
Direct subtypes: 16

Constructors

Table(name:Str, tr:TestsResults)
Undocumented

Methods

Bool(t:Table)
Check whether there are any rows in the table.
calculate_num_cols_to_show(t:Table, max_columns_widths:Arr, available_cols:Int)
Internal method. Please do not use.
column(t:Table, k:Str)
Get values in the given table column.

Returns

Arr
column(t:Table, n:Int)
Get values in the given table column.

Returns

Arr
columns(t:Table)
Get values in all table columns.

Returns

Arr of Arr
each(t:Table, cb:Fun)
Please do not use. This method might change. Call cb with each table row.
echo(t:Table)
Displays a table. Implemented only for tty output (or output_format=text configuration)
echo(t:Table)
Output (echo) CSV table with cells that contain arrays converted to columns. TODO: data escaping.
init(t:Table, name:Any=null)
Initialize rows to an empty array
init(t:Table, name:Any, rows_hashes:Arr)
Create named table containing provided rows

Parameters

namename of the table for display and for configuration purposes
rows_hashesrows, each row is a Hash
init(t:Table, rows_hashes:Arr)
Create unnamed table containing provided rows
len(t:Table)
Get number of rows in the table.
push(t:Table, row_arr:Arr)
Append given row to the table

Returns

t
push(t:Table, row_hash:Hash)
Append given row to the table

Returns

t
register_column(t:Table, k:Any)
Internal method. Please do not use.
width(t:Table)
Internal method. Please do not use.