Class: ConvenientService::Service::Plugins::CanHaveSteps::Commands::CreateStepClass

Inherits:
ConvenientService::Support::Command show all
Includes:
ConvenientService::Support::DependencyContainer::Import
Defined in:
lib/convenient_service/service/plugins/can_have_steps/commands/create_step_class.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConvenientService::Support::DependencyContainer::Import

import

Methods inherited from ConvenientService::Support::Command

[], call

Constructor Details

#initialize(service_class:) ⇒ void

Parameters:

  • service_class (Class)


26
27
28
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/create_step_class.rb', line 26

def initialize(service_class:)
  @service_class = service_class
end

Instance Attribute Details

#service_classObject (readonly)

Returns the value of attribute service_class.



15
16
17
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/create_step_class.rb', line 15

def service_class
  @service_class
end

Instance Method Details

#callClass

Returns:

  • (Class)


33
34
35
# File 'lib/convenient_service/service/plugins/can_have_steps/commands/create_step_class.rb', line 33

def call
  commands.FindOrCreateEntity.call(namespace: service_class, proto_entity: Entities::Step)
end