Sha256: 68456d027b2cb488283ef579197144100ff4558e4e22ff60499a90062db2cb23

Contents?: true

Size: 961 Bytes

Versions: 10

Compression:

Stored size: 961 Bytes

Contents

module WIP
  module Runner
    module Workflow
      class Builder::Workflow  < Builder::Component
        def initialize(command)
          @command = command
          @configs = []
          @guards  = []
          @tasks   = []
        end

        # ---

        def config(key, options = {})
          @configs << [key.to_s, options]
        end

        def guard(description, check, expectation = nil)
          @guards << [description, check, expectation]
        end

        def task(heading, &block)
          @tasks << Builder::Task.new(@command, heading, &block)
        end

        # ---

        def heading
          [@command.class.name.split('::').last, 'Workflow'].join(' ')
        end

        def overview
          clean(@command.class.overview)
        end

        def configs
          @configs
        end

        def guards
          @guards
        end

        def tasks
          @tasks
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wip-runner-0.4.1 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.4.0 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.3.4 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.3.3 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.3.2 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.3.1 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.3.0 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.2.1 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.2.0 lib/wip/runner/workflow/builder/workflow.rb
wip-runner-0.1.0 lib/wip/runner/workflow/builder/workflow.rb