Sha256: caed5b50385204eb42f038e9fcd65081b7729c1f5919dce7f262463de525b1d7

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module HasResultSteps
        module Commands
          class CreateStepClass < Support::Command
            include Support::DependencyContainer::Import

            ##
            # @!attribute [r] service_class
            #   @return Class
            #
            attr_reader :service_class

            ##
            # @return Class
            #
            import :"commands.FindOrCreateEntity", from: Common::Plugins::CanHaveUserProvidedEntity::Container

            ##
            # @param service_class [Class]
            # @return [void]
            #
            def initialize(service_class:)
              @service_class = service_class
            end

            ##
            # @return [Class]
            #
            def call
              commands.FindOrCreateEntity.call(namespace: service_class, proto_entity: Entities::Step)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
convenient_service-0.10.1 lib/convenient_service/service/plugins/has_result_steps/commands/create_step_class.rb
convenient_service-0.10.0 lib/convenient_service/service/plugins/has_result_steps/commands/create_step_class.rb