Sha256: 0af47e680defb10429961faf20639f24810ee7f7f13bbc0af369d9f8c4159a2f
Contents?: true
Size: 1.29 KB
Versions: 6
Compression:
Stored size: 1.29 KB
Contents
= Columnize - Module to print an Array in column order. == Summary In showing a long lists, sometimes one would prefer to see the in sorted column order. Some examples include listing methods of an object or debugger commands. require 'columnize' columnize([1, 2, 3]) 1 2 3 a = (1..100).to_a print columnize((1..100).to_a.map{|x| "%2d" % x}, 60) 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 3 10 17 24 31 38 45 52 59 66 73 80 87 94 4 11 18 25 32 39 46 53 60 67 74 81 88 95 5 12 19 26 33 40 47 54 61 68 75 82 89 96 6 13 20 27 34 41 48 55 62 69 76 83 90 97 7 14 21 28 35 42 49 56 63 70 77 84 91 98 == Credits This is adapted from a method of the same name from Python's cmd module. == Other stuff Author:: Rocky Bernstein <rockyb@rubyforge.net> License:: Copyright (c) 2007 Rocky Bernstein Released under the GNU GPL 2 license == Warranty This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. $Id: README 14 2007-12-09 17:33:36Z rockyb $
Version data entries
6 entries across 6 versions & 2 rubygems
Version | Path |
---|---|
rackjour-0.1.8 | vendor/gems/gems/columnize-0.3.1/README |
columnize-0.3.1 | README |
columnize-0.1 | README |
columnize-0.3.0 | README |
columnize-0.2 | README |
columnize-0.2.1 | README |