Class: Ibandit::GermanDetailsConverter::Rule002002::Check63
- Inherits:
-
Object
- Object
- Ibandit::GermanDetailsConverter::Rule002002::Check63
- Defined in:
- lib/ibandit/german_details_converter.rb
Instance Method Summary collapse
-
#initialize(account_number) ⇒ Check63
constructor
A Deutsche Bank specific variant of Check 63.
- #valid? ⇒ Boolean
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) @account_number = account_number.dup.rjust(10, "0") end |
Instance Method Details
#valid? ⇒ 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 |