Exception: LedgerSync::Error::UnexpectedClassError
- Inherits:
-
LedgerSync::Error
- Object
- StandardError
- LedgerSync::Error
- LedgerSync::Error::UnexpectedClassError
- Defined in:
- lib/ledger_sync/error.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from LedgerSync::Error
Instance Method Summary collapse
-
#initialize(expected:, given:) ⇒ UnexpectedClassError
constructor
A new instance of UnexpectedClassError.
Constructor Details
#initialize(expected:, given:) ⇒ UnexpectedClassError
Returns a new instance of UnexpectedClassError.
34 35 36 37 38 39 40 |
# File 'lib/ledger_sync/error.rb', line 34 def initialize(expected:, given:) expected = Array(expected) super( message: "Unexpected class. Given #{given.name}. Expected: #{expected.map(&:name).join(', ')}" ) end |