Exception: IbanClient::AccountError
- Defined in:
- lib/iban_client/errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from Error
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(iban:, errors:) ⇒ AccountError
constructor
A new instance of AccountError.
- #message ⇒ Object
Constructor Details
#initialize(iban:, errors:) ⇒ AccountError
Returns a new instance of AccountError.
28 29 30 31 |
# File 'lib/iban_client/errors.rb', line 28 def initialize(iban:, errors:) @errors = errors super(iban: iban) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
26 27 28 |
# File 'lib/iban_client/errors.rb', line 26 def errors @errors end |
Instance Method Details
#code ⇒ Object
33 34 35 |
# File 'lib/iban_client/errors.rb', line 33 def code errors.first['code'] end |
#message ⇒ Object
37 38 39 |
# File 'lib/iban_client/errors.rb', line 37 def "#{errors.first['message']} (#{code})" end |