Does Ruby have any Formatter classes or methods that can be used to format numbers for things like currency, etc., or are there any gems that do this, or do you have to writ
Ruby has all the standard print formatters, available either via printf, sprintf or using 'formatstring' % [var1, ...].
'formatstring' % [var1, ...]
>> '%.2f' % 3.14159 #=> "3.14" >> '%4s %-4s' % ['foo', 'bar'] #=> " foo bar "