Class: Ibandit::PseudoIBANSplitter

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

Instance Method Summary collapse

Constructor Details

#initialize(pseudo_iban) ⇒ PseudoIBANSplitter

Returns a new instance of PseudoIBANSplitter.



5
6
7
# File 'lib/ibandit/pseudo_iban_splitter.rb', line 5

def initialize(pseudo_iban)
  @pseudo_iban = pseudo_iban
end

Instance Method Details

#country_codeObject



19
20
21
# File 'lib/ibandit/pseudo_iban_splitter.rb', line 19

def country_code
  @pseudo_iban.slice(0, 2)
end

#splitObject



9
10
11
12
13
14
15
16
17
# File 'lib/ibandit/pseudo_iban_splitter.rb', line 9

def split
  {
    country_code: country_code,
    check_digits: check_digits,
    bank_code: bank_code,
    branch_code: branch_code,
    account_number: ,
  }
end