Class: Ibandit::GermanDetailsConverter::Rule000503::Check76
- Inherits:
-
Object
- Object
- Ibandit::GermanDetailsConverter::Rule000503::Check76
- Defined in:
- lib/ibandit/german_details_converter.rb
Instance Method Summary collapse
-
#initialize(account_number) ⇒ Check76
constructor
A new instance of Check76.
- #valid? ⇒ Boolean
Constructor Details
#initialize(account_number) ⇒ Check76
Returns a new instance of Check76.
291 292 293 |
# File 'lib/ibandit/german_details_converter.rb', line 291 def initialize(account_number) @account_number = account_number.rjust(10, "0") end |
Instance Method Details
#valid? ⇒ Boolean
295 296 297 298 299 |
# File 'lib/ibandit/german_details_converter.rb', line 295 def valid? return false unless valid_length? && valid_account_type? [master_number[-1].to_i, 10].include?(remainder) end |