Class ANSI::Columns
In: lib/ansi/columns.rb
Parent: Object

Methods

list=   new   to_s  

Attributes

align  [RW]  Alignment to apply to cells.
columns  [RW]  Default number of columns to display. If nil then the number of coumns is estimated from the size of the terminal.
format  [RW]  Formating to apply to cells.
list  [RW]  List layout into columns. Each new line is taken to be a row-column cell.
padding  [RW]  Padding size to apply to cells.

Public Class methods

Create a column-based layout.

list - Multiline String or Array of strings to columnize

options[:columns] - number of columns options[:align] - align :left or :right options[:padding] - space to add to each cell

The format block MUST return ANSI codes.

Public Instance methods

Return string in column layout. The number of columns is determined by the `columns` property or overriden by cols argument.

[Validate]