From: Ari Brown Date: 2007-07-16T09:14:13+09:00 Subject: Re: Creating Output Tables Thanks! On Jul 15, 2007, at 8:11 PM, Michael Fellinger wrote: > On 7/16/07, Ari Brown 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.