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



23
24
25
26
27
28
29
# File 'lib/convenient_service/support/castable/exceptions.rb', line 23

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

  initialize(message)
end