Class: ConflowSpec::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/conflow_spec/runner.rb

Overview

Runs the flow and collects informations about it

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flow) ⇒ Runner

Returns a new instance of Runner.

Parameters:

  • flow (Conflow::Flow)

    instance of the flow



9
10
11
12
13
# File 'lib/conflow_spec/runner.rb', line 9

def initialize(flow)
  @flow = flow
  @queue = queue
  @performed_jobs = []
end

Instance Attribute Details

#flowObject (readonly)

Returns the value of attribute flow.



6
7
8
# File 'lib/conflow_spec/runner.rb', line 6

def flow
  @flow
end

#performed_jobsObject (readonly)

Returns the value of attribute performed_jobs.



6
7
8
# File 'lib/conflow_spec/runner.rb', line 6

def performed_jobs
  @performed_jobs
end

Instance Method Details

#runObject

Performs all jobs in the flow, saving results in #performed_jobs



16
17
18
# File 'lib/conflow_spec/runner.rb', line 16

def run
  finish(queue.pop) until queue.empty?
end