Exception: ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Exceptions::BothArgsAndKwargsArePassed Private

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/service/plugins/has_j_send_result_short_syntax/exceptions.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(status:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Since:

  • 1.0.0



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/convenient_service/service/plugins/has_j_send_result_short_syntax/exceptions.rb', line 58

def initialize_with_kwargs(status:)
  message = <<~TEXT
    Both `args` and `kwargs` are passed to the `#{status}` method.

    Did you mean something like:

    #{status}("Helpful text")
    #{status}("Helpful text", :descriptive_code)

    #{status}(message: "Helpful text")
    #{status}(message: "Helpful text", code: :descriptive_code)
  TEXT

  initialize(message)
end