Sha256: 0d53328641fbbd30de202d75f89ce2a510ecd23c608b2c3c40309499253cf039

Contents?: true

Size: 420 Bytes

Versions: 9

Compression:

Stored size: 420 Bytes

Contents

class Forgery::Currency < Forgery

  # Generates a random currency description
  #
  #   Forgery(:currency).description
  #   # => "Australian Dollars"
  def self.description
    dictionaries[:currency_descriptions].random.unextend
  end
  
  # Generates a random currency code for a country
  #
  #   Forgery(:currency).code
  #   # => "AUD"
  def self.code
    dictionaries[:currency_codes].random.unextend
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
forgery-0.8.1 lib/forgery/forgery/currency.rb
forgery-0.7.0 lib/forgery/forgery/currency.rb
forgery-0.6.0 lib/forgery/forgery/currency.rb
forgery-0.5.0 lib/forgery/forgery/currency.rb
forgery-0.4.4 lib/forgery/forgery/currency.rb
forgery-0.4.3 lib/forgery/forgery/currency.rb
forgery-0.4.2 lib/forgery/forgery/currency.rb
forgery-0.4.1 lib/forgery/forgery/currency.rb
forgery-0.4.0 lib/forgery/forgery/currency.rb