Sha256: 461359c108e227d0c535d7da310ffa4b263088c3bc03915c25841541b85c2ced

Contents?: true

Size: 1007 Bytes

Versions: 4

Compression:

Stored size: 1007 Bytes

Contents

# frozen_string_literal: true

module DevSuite
  module Workflow
    require_relative "step_context"
    require_relative "step"
    require_relative "engine"

    class << self
      def create_engine(context = {}, **options)
        Engine.new(context, **options)
      end

      def create_step(name, type: :base, **args, &block)
        Step.build_component(type, name: name, **args, &block)
      end

      def create_base_step(name, &block)
        create_step(name, type: :base, &block)
      end

      def create_parallel_step(name, &block)
        create_step(name, type: :parallel, &block)
      end

      def create_conditional_step(name, condition:, &block)
        create_step(name, type: :conditional, condition: condition, &block)
      end

      def create_loop_step(name, iterations:, &block)
        create_step(name, type: :loop, iterations: iterations, &block)
      end

      def create_composite_step(name)
        create_step(name, type: :composite)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dev_suite-0.2.13 lib/dev_suite/workflow/workflow.rb
dev_suite-0.2.12 lib/dev_suite/workflow/workflow.rb
dev_suite-0.2.11 lib/dev_suite/workflow/workflow.rb
dev_suite-0.2.10 lib/dev_suite/workflow/workflow.rb