Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeServiceStep::Commands::CalculateServiceResult Private

Inherits:
ConvenientService::Support::Command show all
Defined in:
lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.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 Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(step:) ⇒ 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.



28
29
30
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 28

def initialize(step:)
  @step = step
end

Instance Attribute Details

#stepObject (readonly)

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.

Since:

  • 1.0.0



22
23
24
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 22

def step
  @step
end

Instance Method Details

#callConvenientService::Service::Plugins::HasJSendResult::Entities::Result

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.

Returns:

Raises:

  • (ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeMethodStep::Exceptions::StepIsNotServiceStep)

Since:

  • 1.0.0



36
37
38
39
40
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 36

def call
  ::ConvenientService.raise Exceptions::StepIsNotServiceStep.new(step: step) unless step.service_step?

  service.result(*input_arguments.args, **input_arguments.kwargs, &input_arguments.block)
end