Class: Forgery::BankAccount
- Defined in:
- lib/forgery/forgery/bank_account.rb
Overview
Generates random bank account information
Constant Summary
Constants inherited from Forgery
Class Method Summary collapse
-
.bic ⇒ Object
Gets a random bic out of the ‘bics’ dictionary.
-
.iban ⇒ Object
Gets a random iban out of the ‘ibans’ dictionary.
Methods inherited from Forgery
Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root
Class Method Details
.bic ⇒ Object
Gets a random bic out of the ‘bics’ dictionary.
Forgery(:bank_account).bic
# => "AARBDE5W100"
Forgery(:bank_account).bic
# => "GENODEF1PA1"
22 23 24 |
# File 'lib/forgery/forgery/bank_account.rb', line 22 def self.bic dictionaries[:bics].random.unextend end |
.iban ⇒ Object
Gets a random iban out of the ‘ibans’ dictionary.
Forgery(:bank_account).iban
# => "BE68539007547034"
Forgery(:bank_account).iban
# => "FI2112345600000785"
11 12 13 |
# File 'lib/forgery/forgery/bank_account.rb', line 11 def self.iban dictionaries[:ibans].random.unextend end |