Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeServiceStep::Commands::CalculateServiceResult
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Plugins::CanBeServiceStep::Commands::CalculateServiceResult
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb
Instance Attribute Summary collapse
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Instance Method Summary collapse
- #call ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
- #initialize(step:) ⇒ void constructor
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(step:) ⇒ void
23 24 25 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 23 def initialize(step:) @step = step end |
Instance Attribute Details
#step ⇒ Object (readonly)
Returns the value of attribute step.
17 18 19 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 17 def step @step end |
Instance Method Details
#call ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
34 35 36 37 38 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/plugins/can_be_service_step/commands/calculate_service_result.rb', line 34 def call ::ConvenientService.raise Exceptions::StepIsNotServiceStep.new(step: step) unless step.service_step? service.result(**input_values) end |