Tablo
Constants
Predefined connectors strings, whose size is 15 characters (raise
Tablo::ParamException otherwise), but the user is free to use
its own string of connectors when instanciating a new Tablo::Table
object.
The first 9 characters are corner or cross connectors, the first 3 correspond to the top line, the next 3 to a middle line and the last 3 to the bottom line.
The next 3 are vertical line connectors, one for each column type
The last 3 are horizontal line connectors, one for each line type
Style string contains the initial of line or column types (case insensitive, may be separated for better readability, but not mandatory) :
- lc : Left column
- mc : middle columns
- rc : right column
- tl : Top line
- ml : Middle lines
- bl : bottom lines
Instance methods
Casts a 2D array of some types to a Tablo::DataType, recursively calling itself
with each array element as argument until conversion is complete
Returns a vertical line connector, column type specific
fpjust align floating point values on decimal separator
Parameters :
- col : the column to be formatted
- nbdec : Number of decimals (using printf %.[nbdec]f format)
- mode allows for tuning output :
- nil : mere printf formatting
- 0 : non signficant zeroes removed and decimal point kept even if no more decimal digits
- 1 : non signficant zeroes removed and decimal point also removed if no more decimal digits
- 2 : like 1, but all blanks if value == zero
- 3 : same as 0, but zero added after decimal point if no more decimal digits
Validates that the 2d Array argument can be converted to a DataType
Check the connectors string size : must be 15 characters long.