Class: Forgery::Currency

Inherits:
Forgery show all
Defined in:
lib/forgery/forgery/currency.rb

Constant Summary

Constants inherited from Forgery

VERSION

Class Method Summary collapse

Methods inherited from Forgery

Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root

Class Method Details

.codeObject

Generates a random currency code for a country

Forgery(:currency).code# => "AUD"


15
16
17
# File 'lib/forgery/forgery/currency.rb', line 15

def self.code
  dictionaries[:currency_codes].random.unextend
end

.descriptionObject

Generates a random currency description

Forgery(:currency).description# => "Australian Dollars"


7
8
9
# File 'lib/forgery/forgery/currency.rb', line 7

def self.description
  dictionaries[:currency_descriptions].random.unextend
end