abstract class TableOutput
- TableOutput
- Reference
- Object
Direct Known Subclasses
Defined in:
table_output.crConstant Summary
-
COLUMN_WIDTH =
16
-
DIFF_STYLER =
->(cell : Tablo::CellType) do color = if cell.to_s.starts_with?("-") :red else :green end (cell.colorize(color)).to_s end
-
HIGHLIGHT_STYLER =
->(cell : Tablo::CellType) do match = cell.to_s.match(/(.*)\*(.+)\*(.*)/) if match "#{match[1]}#{((match[2].colorize(:black)).back(:yellow)).to_s}#{match[3]} " else cell.to_s end end
-
Adds a yellow background to the text between
*text*
. At the end we add to whitespaces to keep the length of the cell