Class: ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::ExtractParams
- Inherits:
-
ConvenientService::Support::Command
- Object
- ConvenientService::Support::Command
- ConvenientService::Service::Plugins::CanHaveSteps::Entities::Step::Commands::ExtractParams
- Defined in:
- lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#kwargs ⇒ Object
readonly
Returns the value of attribute kwargs.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args:, kwargs:) ⇒ ExtractParams
constructor
A new instance of ExtractParams.
Methods inherited from ConvenientService::Support::Command
Constructor Details
#initialize(args:, kwargs:) ⇒ ExtractParams
Returns a new instance of ExtractParams.
13 14 15 16 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb', line 13 def initialize(args:, kwargs:) @args = args @kwargs = kwargs end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
11 12 13 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb', line 11 def args @args end |
#kwargs ⇒ Object (readonly)
Returns the value of attribute kwargs.
11 12 13 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb', line 11 def kwargs @kwargs end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb', line 18 def call Structs::Params.new( action: args.first, inputs: Utils::Array.wrap(kwargs[:in]), outputs: Utils::Array.wrap(kwargs[:out]), index: kwargs[:index], container: kwargs[:container], organizer: kwargs[:organizer], extra_kwargs: Utils::Hash.except(kwargs, [:in, :out, :index, :container, :organizer]) ) end |