Sha256: cdca68ddc30537a3873ec2bafcae9410fcf7f99cf423430755d972c8a09b9407

Contents?: true

Size: 1 KB

Versions: 8

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveSteps
        module Entities
          class Step
            module Commands
              class ExtractParams < Support::Command
                attr_reader :args, :kwargs

                def initialize(args:, kwargs:)
                  @args = args
                  @kwargs = kwargs
                end

                def call
                  Structs::Params.new(
                    service: 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
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/can_have_steps/entities/step/commands/extract_params.rb