Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::CastParams
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::CastParams
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb
Instance Attribute Summary collapse
-
#original_params ⇒ Object
readonly
Returns the value of attribute original_params.
Instance Method Summary collapse
-
#action ⇒ Object
Can be any type.
- #call ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Structs::Params
- #container ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service
- #extra_kwargs ⇒ Hash{Symbol => Object}
- #index ⇒ Integer
- #initialize(original_params:) ⇒ void constructor
- #inputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
- #organizer ⇒ ConvenientService::Service
- #outputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(original_params:) ⇒ void
21 22 23 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 21 def initialize(original_params:) @original_params = original_params end |
Instance Attribute Details
#original_params ⇒ Object (readonly)
Returns the value of attribute original_params.
15 16 17 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 15 def original_params @original_params end |
Instance Method Details
#action ⇒ Object
Returns Can be any type.
43 44 45 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 43 def action @action ||= original_params.action end |
#call ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Structs::Params
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 28 def call Structs::Params.new( action: action, inputs: inputs, outputs: outputs, index: index, container: container, organizer: organizer, extra_kwargs: extra_kwargs ) end |
#container ⇒ ConvenientService::Service::Plugins::CanHaveSteps::Entities::Service
74 75 76 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 74 def container @container ||= Entities::Service.cast!(original_params.container) end |
#extra_kwargs ⇒ Hash{Symbol => Object}
88 89 90 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 88 def extra_kwargs @extra_kwargs ||= original_params.extra_kwargs end |
#index ⇒ Integer
67 68 69 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 67 def index @index ||= original_params.index end |
#inputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
53 54 55 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 53 def inputs @inputs ||= original_params.inputs.map { |input| Entities::Method.cast!(input, direction: :input) } end |
#organizer ⇒ ConvenientService::Service
81 82 83 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 81 def organizer @organizer ||= original_params.organizer end |
#outputs ⇒ Array<ConvenientService::Service::Plugins::CanHaveSteps::Entities::Method>
60 61 62 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/cast_params.rb', line 60 def outputs @outputs ||= original_params.outputs.map { |output| Entities::Method.cast!(output, direction: :output) } end |