class Columnize::Columnizer
def arrange_by_row(list, nrows, ncols)
arrange_by_row((1..5).to_a, 3, 2) =>
Here is an example:
information.
access this for the list data or for the width
In either horizontal or vertical arrangement, we will need to
array into a 2-dimensional lists of lists organized by rows.
Given +list+, +ncols+, +nrows+, arrange the one-dimensional
def arrange_by_row(list, nrows, ncols) (0...nrows).map {|r| list[r*ncols, ncols] }.compact end