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) Source: autoload/TestsResults.ngs:66
Undocumented

Methods

Bool(t:Table) Source: autoload/Table.ngs:106
Check whether there are any rows in the table.
calculate_num_cols_to_show(t:Table, max_colums_widths:Arr, available_cols:Int) Source: autoload/Table.ngs:110
Internal method. Please do not use.
column(t:Table, k:Str) Source: autoload/Table.ngs:86
Get values in the given table column.

Returns

Arr
column(t:Table, n:Int) Source: autoload/Table.ngs:90
Get values in the given table column.

Returns

Arr
columns(t:Table) Source: autoload/Table.ngs:94
Get values in all table columns.

Returns

Arr of Arr
each(t:Table, cb:Fun) Source: autoload/Table.ngs:98
Please do not use. This method might change. Call cb with each table row.
echo(t:Table) Source: autoload/Table.ngs:123
Displays a table. Implemented only for tty output (or output_format=text configuration)
echo(t:Table) Source: autoload/Table.ngs:198
Output (echo) CSV table with cells that contain arrays converted to columns. TODO: data escaping.
init(t:Table, name:Any=null) Source: autoload/Table.ngs:33
Initialize rows to an empty array
init(t:Table, name:Any, rows_hashes:Arr) Source: autoload/Table.ngs:47
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) Source: autoload/Table.ngs:59
Create unnamed table containing provided rows
len(t:Table) Source: autoload/Table.ngs:103
Get number of rows in the table.
push(t:Table, row_arr:Arr) Source: autoload/Table.ngs:68
Append given row to the table

Returns

t
push(t:Table, row_hash:Hash) Source: autoload/Table.ngs:76
Append given row to the table

Returns

t
register_column(t:Table, k:Any) Source: autoload/Table.ngs:62
Internal method. Please do not use.
width(t:Table) Source: autoload/Table.ngs:82
Internal method. Please do not use.