Exception: ConvenientService::Support::Castable::Exceptions::FailedToCast

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/support/castable/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(other:, klass:) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/convenient_service/support/castable/exceptions.rb', line 18

def initialize_with_kwargs(other:, klass:)
  message = <<~TEXT
    Failed to cast `#{other.inspect}` into `#{klass}`.
  TEXT

  initialize(message)
end