Exception: ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Success::Exceptions::KwargsContainJSendAndExtraKeys
- Inherits:
-
Exception
- Object
- StandardError
- Exception
- ConvenientService::Service::Plugins::HasJSendResultShortSyntax::Success::Exceptions::KwargsContainJSendAndExtraKeys
- Defined in:
- lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/exceptions.rb
Instance Method Summary collapse
Methods inherited from Exception
Instance Method Details
#initialize_without_arguments ⇒ void
This method returns an undefined value.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/convenient_service/service/plugins/has_j_send_result_short_syntax/success/exceptions.rb', line 13 def initialize_without_arguments = " `kwargs` passed to `success` method contain JSend keys and extra keys. That's NOT allowed.\n\n Please, consider something like:\n\n # Shorter form. Assumes that all kwargs are `data`.\n success(foo: :bar)\n\n # Longer form. More explicit.\n success(data: {foo: :bar})\n\n # (Advanced) Longer form also supports any other variation of `data`, `message` and `code`...\n success(data: {foo: :bar}, message: \"foo\")\n success(data: {foo: :bar}, code: :foo)\n success(data: {foo: :bar}, message: \"foo\", code: :foo)\n success(message: \"foo\")\n success(code: :foo)\n TEXT\n\n initialize(message)\nend\n" |