Exception: ISO::IBAN::Invalid
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- ISO::IBAN::Invalid
- Defined in:
- lib/iso/iban/invalid.rb
Overview
Raised by ISO::IBAN::parse!
Instance Attribute Summary (collapse)
-
- (Array<Symbol>) errors
readonly
The errors in the IBAN.
-
- (ISO::IBAN) iban
readonly
The faulty IBAN.
Instance Method Summary (collapse)
-
- (Invalid) initialize(iban)
constructor
A new instance of Invalid.
Constructor Details
- (Invalid) initialize(iban)
Returns a new instance of Invalid
18 19 20 21 22 |
# File 'lib/iso/iban/invalid.rb', line 18 def initialize(iban) @iban = iban @errors = iban.validate super("The IBAN #{@iban.formatted} is invalid (#{@errors.join(', ')})") end |
Instance Attribute Details
- (Array<Symbol>) errors (readonly)
Returns The errors in the IBAN.
11 12 13 |
# File 'lib/iso/iban/invalid.rb', line 11 def errors @errors end |
- (ISO::IBAN) iban (readonly)
Returns The faulty IBAN.
14 15 16 |
# File 'lib/iso/iban/invalid.rb', line 14 def iban @iban end |