Class: Ibandit::PseudoIBANAssembler

Inherits:
Object
  • Object
show all
Defined in:
lib/ibandit/pseudo_iban_assembler.rb

Instance Method Summary collapse

Constructor Details

#initialize(country_code: nil, bank_code: nil, branch_code: nil, account_number: nil) ⇒ PseudoIBANAssembler

Returns a new instance of PseudoIBANAssembler.



5
6
7
8
9
10
11
12
13
# File 'lib/ibandit/pseudo_iban_assembler.rb', line 5

def initialize(country_code: nil,
               bank_code: nil,
               branch_code: nil,
               account_number: nil)
  @country_code = country_code
  @bank_code = bank_code
  @branch_code = branch_code
  @account_number = 
end

Instance Method Details

#assembleObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ibandit/pseudo_iban_assembler.rb', line 15

def assemble
  return unless can_assemble?

  [
    @country_code,
    Constants::PSEUDO_IBAN_CHECK_DIGITS,
    padded_bank_code,
    padded_branch_code,
    ,
  ].join
end