Class: Ibandit::GermanDetailsConverter::Rule002002::Check63

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

Instance Method Summary collapse

Constructor Details

#initialize(account_number) ⇒ Check63

A Deutsche Bank specific variant of Check 63



539
540
541
# File 'lib/ibandit/german_details_converter.rb', line 539

def initialize()
  @account_number = .dup.rjust(10, "0")
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


543
544
545
546
# File 'lib/ibandit/german_details_converter.rb', line 543

def valid?
  expected_check_digit = (10 - remainder) % 10
  expected_check_digit == @account_number[-3].to_i
end