Class: Forgery::BankAccount

Inherits:
Forgery
  • Object
show all
Defined in:
lib/forgery/forgery/bank_account.rb

Overview

Generates random bank account information

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

.bicObject

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

.ibanObject

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