Class: Exception1

Inherits:
BaseException show all
Defined in:
lib/uk_account_validator/exceptions/exception_1.rb

Overview

Perform the double alternate check except:

Add 27 to the total (ie before you divide by 10)

This effectively places a financial institution number (580149) before the sorting code and account number which is subject to the alternate doubling as well.

Constant Summary

Constants included from NumberIndices

NumberIndices::NUMBER_INDEX

Instance Attribute Summary

Attributes inherited from BaseException

#account_number, #check_number, #modulus_weight, #sort_code

Instance Method Summary collapse

Methods inherited from BaseException

allow_any?, #apply_account_number_substitutions, #apply_sort_code_substitutions, #initialize, #override_test?, #replace_weight, #zero_all, #zero_u_b

Constructor Details

This class inherits a constructor from BaseException

Instance Method Details

#after_calculate_total(total, _test_digits) ⇒ Object



7
8
9
# File 'lib/uk_account_validator/exceptions/exception_1.rb', line 7

def after_calculate_total(total, _test_digits)
  return total + 27
end