Class: Forgery::Currency
- Defined in:
- lib/forgery/forgery/currency.rb
Constant Summary
Constants inherited from Forgery
Class Method Summary collapse
-
.code ⇒ Object
Generates a random currency code for a country.
-
.description ⇒ Object
Generates a random currency description.
Methods inherited from Forgery
Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root
Class Method Details
.code ⇒ Object
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 |
.description ⇒ Object
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 |