class Sheen::TableResizer

Overview

Internal column-width and row-height optimizer for Table.

Mutates column and height state throughout the optimization.

Defined in:

sheen/table_resizer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(table : Table, rows : Array(Array(String))) #

Sets up the resizer for table using the already-rendered rows.


[View source]

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.


[View source]