Sha256: 2dd1f03b9ea68df56a9a935d534cad24247f6f36f9741727d5108a55a5b4a77a
Contents?: true
Size: 266 Bytes
Versions: 3
Compression:
Stored size: 266 Bytes
Contents
module Papla class MoneyConverter < FloatConverter def convert(number) append_currency(super(number.to_f.round(2)), number) end private def append_currency(phrase, money) '%s %s' % [phrase, money.currency_as_string] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
papla-0.1.2 | lib/papla/money_converter.rb |
papla-0.1.1 | lib/papla/money_converter.rb |
papla-0.1.0 | lib/papla/money_converter.rb |