Sha256: e20c57d52ece403ce3a6c90cacf5b94202ad0fd68fecb5d6ebaebdc5d8ccc3a9

Contents?: true

Size: 1 KB

Versions: 12

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Common
    module Plugins
      module HasInternals
        module Commands
          class CreateInternalsClass < Support::Command
            include Support::DependencyContainer::Import

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

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

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

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.19.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.18.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.17.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.16.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.15.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.14.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.13.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.12.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.11.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.10.1 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb
convenient_service-0.10.0 lib/convenient_service/common/plugins/has_internals/commands/create_internals_class.rb