Ari Brown
7/16/2007 12:14:00 AM
Thanks!
On Jul 15, 2007, at 8:11 PM, Michael Fellinger wrote:
> On 7/16/07, Ari Brown <ari@aribrown.com> wrote:
>> HAI,
>> Is there a suggested library for creating nice tabley
>> outputs? I was
>> looking for output much in the way that benchmark has its output.
>>
>> asdf 12321 asdf
>> asdf 12312 qemp[g
>> qlfckjsd 987234 asdf
>>
>> etcetera.
>
> require 'ruport'
>
> table = [
> %w[asdf 12344 asdf],
> %w[asdf 12342 qwer(d],
> %w[zxcvdfg 23521 vbcbd]
> ].to_table
>
> puts table.to_text # =>
>
> +--------------------------+
> | asdf | 12344 | asdf |
> | asdf | 12342 | qwer(d |
> | zxcvdfg | 23521 | vbcbd |
> +--------------------------+
>
>
--------------------------------------------|
If you're not living on the edge,
then you're just wasting space.