Module: Columnize

Module | Columnize
In: | lib/columnize.rb lib/columnize.rb

Adapted from the routine of the same name in cmd.py

### Methods

columnize columnize

### Public Instance methods

columnize(list, displaywidth=80, colsep = ' ', arrange_vertical=true, ljust=true)

or arranged horizontally:

        ['1', '2,', '3', '4'] => '1  2\n3  4\n'

Each column is only as wide possible, no larger than +displaywidth’. If `list` is not an array, the empty string, ’’, is returned. By default, columns are separated by two spaces - one was not legible enough. Set `colsep` to adjust the string separate columns. If `arrange_vertical` is set false, consecutive items will go across, left to right, top to bottom.

columnize(list, displaywidth=80, colsep = ' ', arrange_vertical=true, ljust=true)

or arranged horizontally:

        ['1', '2,', '3', '4'] => '1  2\n3  4\n'

Each column is only as wide possible, no larger than +displaywidth’. If `list` is not an array, the empty string, ’’, is returned. By default, columns are separated by two spaces - one was not legible enough. Set `colsep` to adjust the string separate columns. If `arrange_vertical` is set false, consecutive items will go across, left to right, top to bottom.

[Validate]