Path: | lib/columnize.rb |
Last Update: | Tue Sep 25 20:02:32 +0000 2012 |
Module to format an Array as an Array of String aligned in columns.
Display a list of strings as a compact set of columns.
For example, for a line width of 4 characters (arranged vertically): ['1', '2,', '3', '4'] => '1 3\n2 4\n' or arranged horizontally: ['1', '2,', '3', '4'] => '1 2\n3 4\n'
Each column is only as wide as necessary. By default, columns are separated by two spaces. Options are avalable for setting
Columnize is copyright (C) 2007, 2008, 2009, 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
All rights reserved. You can redistribute and/or modify it under the same terms as Ruby.
Adapted from the routine of the same name in Python +cmd.py+.