Exception: ConvenientService::Service::Plugins::ForbidsConvenientServiceEntitiesAsConstructorArguments::Exceptions::DataPassedAsConstructorArgument
- Inherits:
-
Exception
- Object
- StandardError
- Exception
- ConvenientService::Service::Plugins::ForbidsConvenientServiceEntitiesAsConstructorArguments::Exceptions::DataPassedAsConstructorArgument
- Defined in:
- lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments/exceptions.rb
Instance Method Summary collapse
Methods inherited from Exception
Instance Method Details
#initialize_with_kwargs(selector:, service:, data:) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/convenient_service/service/plugins/forbids_convenient_service_entities_as_constructor_arguments/exceptions.rb', line 56 def initialize_with_kwargs(selector:, service:, data:) = <<~TEXT Data of `#{Utils::Class.display_name(data.result.service.class)}` result is passed as constructor argument `#{selector}` to `#{Utils::Class.display_name(service.class)}`. It is an antipattern. It neglects the idea of steps. Please, convert it to hash or try to reorganize `#{Utils::Class.display_name(service.class)}` service. TEXT initialize() end |