Module: ConvenientService::Service::Plugins::CanBeCalled::Concern
- Includes:
- ConvenientService::Support::Concern
- Defined in:
- lib/convenient_service/service/plugins/can_be_called/concern.rb
Class Method Summary collapse
-
.call ⇒ Hash{Symbol => Object}?
When the result has the
successstatus, it returns the result data as a hash.
Instance Method Summary collapse
-
#call ⇒ Hash{Symbol => Object}?
When the result has the
successstatus, it returns the result data as a hash.
Class Method Details
.call ⇒ Hash{Symbol => Object}?
ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::CanBeCalled::Exceptions::ErrorResultIsCalled is aliased as ConvenientService::Result::Exceptions::ErrorResultIsCalled.
stub_service RSpec helper affects call.
When the result has the success status, it returns the result data as a hash.
When the result has the failure status, it returns nil.
When the result has the error status, it raises an ErrorResultIsCalled exception.
29 30 31 |
# File 'lib/convenient_service/service/plugins/can_be_called/concern.rb', line 29 def call(...) result(...).call end |
Instance Method Details
#call ⇒ Hash{Symbol => Object}?
ConvenientService::Service::Plugins::HasJSendResult::Entities::Result::Plugins::CanBeCalled::Exceptions::ErrorResultIsCalled is aliased as ConvenientService::Result::Exceptions::ErrorResultIsCalled.
stub_service RSpec helper affects call.
When the result has the success status, it returns the result data as a hash.
When the result has the failure status, it returns nil.
When the result has the error status, it raises an ErrorResultIsCalled exception.
48 49 50 |
# File 'lib/convenient_service/service/plugins/can_be_called/concern.rb', line 48 def call result.call end |