Class: Roast::Workflow::StepExecutorFactory
- Inherits:
-
Object
- Object
- Roast::Workflow::StepExecutorFactory
- Defined in:
- lib/roast/workflow/step_executor_factory.rb
Overview
Factory for creating step executors - now delegates to registry
Class Method Summary collapse
-
.ensure_defaults_registered ⇒ Object
Method to ensure default executors are registered.
-
.for(step, workflow_executor) ⇒ Object
Delegate to the registry for backward compatibility.
-
.register(klass, executor_class) ⇒ Object
Allow registration of new executors.
-
.register_with_matcher(matcher, executor_class) ⇒ Object
Allow registration with custom matchers.
Class Method Details
.ensure_defaults_registered ⇒ Object
Method to ensure default executors are registered
9 10 11 12 13 14 15 16 17 |
# File 'lib/roast/workflow/step_executor_factory.rb', line 9 def ensure_defaults_registered return if @defaults_registered StepExecutorRegistry.register(Hash, StepExecutors::HashStepExecutor) StepExecutorRegistry.register(Array, StepExecutors::ParallelStepExecutor) StepExecutorRegistry.register(String, StepExecutors::StringStepExecutor) @defaults_registered = true end |
.for(step, workflow_executor) ⇒ Object
Delegate to the registry for backward compatibility
25 26 27 28 |
# File 'lib/roast/workflow/step_executor_factory.rb', line 25 def for(step, workflow_executor) ensure_defaults_registered StepExecutorRegistry.for(step, workflow_executor) end |
.register(klass, executor_class) ⇒ Object
Allow registration of new executors
31 32 33 |
# File 'lib/roast/workflow/step_executor_factory.rb', line 31 def register(klass, executor_class) StepExecutorRegistry.register(klass, executor_class) end |
.register_with_matcher(matcher, executor_class) ⇒ Object
Allow registration with custom matchers
36 37 38 |
# File 'lib/roast/workflow/step_executor_factory.rb', line 36 def register_with_matcher(matcher, executor_class) StepExecutorRegistry.register_with_matcher(matcher, executor_class) end |