Module: FFaker::BankUS
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#account_number(min_digits: 9, max_digits: 17) ⇒ Object
8
9
10
|
# File 'lib/ffaker/bank_us.rb', line 8
def account_number(min_digits: 9, max_digits: 17)
FFaker.numerify('#' * rand(min_digits..max_digits))
end
|
#routing_number ⇒ Object
12
13
14
15
16
17
|
# File 'lib/ffaker/bank_us.rb', line 12
def routing_number
partial_routing_number = FFaker.numerify('########')
ninth_digit = generate_ninth_digit(partial_routing_number)
"#{partial_routing_number}#{ninth_digit}"
end
|