Class: WIP::Runner::Workflow::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/wip/runner/workflow/builder.rb

Defined Under Namespace

Classes: Component, Step, Task, Workflow

Instance Method Summary collapse

Constructor Details

#initialize(command, &block) ⇒ Builder

Returns a new instance of Builder.



5
6
7
8
# File 'lib/wip/runner/workflow/builder.rb', line 5

def initialize(command, &block)
  @command = command
  @block   = block
end

Instance Method Details

#build(arguments, options) ⇒ Object



10
11
12
13
14
# File 'lib/wip/runner/workflow/builder.rb', line 10

def build(arguments, options)
  workflow = Workflow.new(@command)
  workflow.instance_exec(arguments, options, &@block)
  workflow
end