2011/5/24 Xavier Noria <fxn / hashref.com>:
> Not sure if I understand correctly, but this seems to do what you are
> looking for
>
> hash.each do |key, value|
> printf "%-12s %10s\n", "#{key}:", value
> end
>
> Max field widths may be computed for arbitrary hashes.

Yes, I got exactly that as todl in my previous mail :)


> -- fxn
>
> PD: Note that I use printf, format is the same as sprintf, but you print the
> formatted string directly, as in C.

Thanks for pointing it out.


-- 
Iaki Baz Castillo
<ibc / aliax.net>