Sha256: 885bf30b99d0a2fdeb2e4c2a4ea0dbd5cfa573d60888faf2525726b36d2ff43e
Contents?: true
Size: 267 Bytes
Versions: 1
Compression:
Stored size: 267 Bytes
Contents
class BigDecimal def to_s_with_format(*args) if args.empty? "%.2f" % self else to_s_without_format(*args) end end alias_method :to_s_without_format, :to_s alias_method :to_s, :to_s_with_format def in_cents self * 100 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
big_decimal_price-0.1.1 | lib/big_decimal.rb |