Class: Faker::Bank
Constant Summary
Constants inherited
from Base
Faker::Base::Letters, Faker::Base::Numbers, Faker::Base::ULetters
Class Method Summary
collapse
Methods inherited from Base
bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, sample, shuffle, translate, unique, with_locale
Class Method Details
.iban(country_code = "GB") ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/faker/bank.rb', line 14
def iban(country_code = "GB")
[
country_code.upcase,
Array.new(2) { rand(10) },
iban_range(country_code, :letter_code) { (65 + rand(26)).chr },
iban_range(country_code, :digits) { rand(10) }
].join
end
|
.name ⇒ Object
6
7
8
|
# File 'lib/faker/bank.rb', line 6
def name
fetch('bank.name')
end
|
.swift_bic ⇒ Object
10
11
12
|
# File 'lib/faker/bank.rb', line 10
def swift_bic
fetch('bank.swift_bic')
end
|