Sha256: b1cb7af16955a13dfbb0d16ad1baadef717434c38b6821c7611600723a2ae342
Contents?: true
Size: 319 Bytes
Versions: 16
Compression:
Stored size: 319 Bytes
Contents
class Forgery::Monetary < Forgery def self.formatted_money(options={}) "$%1.2f" % money(options) end def self.money(options={}) options = {:max => 10, :min => 0}.merge(options) value = ((options[:min] * 100)..(options[:max] * 100)).random "%1.2f" % (value.to_f / 100) end end
Version data entries
16 entries across 16 versions & 1 rubygems