class
Sheen::TableResizer
- Sheen::TableResizer
- Reference
- Object
Overview
Internal column-width and row-height optimizer for Table.
Mutates column and height state throughout the optimization.
Defined in:
sheen/table_resizer.crConstructors
-
.new(table : Table, rows : Array(Array(String)))
Sets up the resizer for table using the already-rendered rows.
Instance Method Summary
-
#resize : Tuple(Array(Int32), Array(Int32))
Returns the optimized column widths and row heights.
Constructor Detail
Sets up the resizer for table using the already-rendered rows.
Instance Method Detail
def resize : Tuple(Array(Int32), Array(Int32))
#
Returns the optimized column widths and row heights. Expand the columns evenly to fit the width, distributing the surplus to the shortest columns first.