Class: BankingDataValidator::Bank::HSBC
- Defined in:
- lib/banking_data_validator/bank/hsbc.rb
Instance Method Summary collapse
-
#initialize(branch, account_number, account_digit) ⇒ HSBC
constructor
A new instance of HSBC.
Methods inherited from Base
valid_account?, #valid_account?
Constructor Details
#initialize(branch, account_number, account_digit) ⇒ HSBC
Returns a new instance of HSBC.
7 8 9 10 11 12 |
# File 'lib/banking_data_validator/bank/hsbc.rb', line 7 def initialize(branch, account_number, account_digit) account = account_number + account_digit @branch = padding_with_zeros(branch, 4) @account_number = padding_with_zeros(account[0..5]) @account_digit = padding_with_zeros(account[6]) end |