I am generating a script that is outputting information to the console. The information is some kind of statistic with a value. So much like a hash.
So one value\'s
There was few bugs in it before, but now you can use most of printf syntax with % operator:
1.9.3-p194 :025 > " %-20s %05d" % ['hello', 12] => " hello 00012"
Of course you can use precalculated width too:
1.9.3-p194 :030 > "%-#{width}s %05x" % ['hello', 12] => "hello 0000c"