Class: Exception3
- Inherits:
-
BaseException
- Object
- BaseException
- Exception3
- Defined in:
- lib/uk_account_validator/exceptions/exception_3.rb
Overview
If c=6 or c=9 the double alternate check does not need to be carried out
Constant Summary
Constants included from NumberIndices
Instance Attribute Summary
Attributes inherited from BaseException
#account_number, #check_number, #modulus_weight, #sort_code
Instance Method Summary collapse
Methods inherited from BaseException
#after_calculate_total, allow_any?, #apply_account_number_substitutions, #apply_sort_code_substitutions, #initialize, #override_test?, #zero_all, #zero_u_b
Constructor Details
This class inherits a constructor from BaseException
Instance Method Details
#replace_weight(test_digits) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/uk_account_validator/exceptions/exception_3.rb', line 3 def replace_weight(test_digits) c = test_digits[NUMBER_INDEX[:c]] return zero_all if c == 6 || c == 9 return modulus_weight end |