Class: Jive::BatchRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/jive/batch_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner: Runner.new, stdout: $stdout) ⇒ BatchRunner

Returns a new instance of BatchRunner.



7
8
9
10
# File 'lib/jive/batch_runner.rb', line 7

def initialize(runner: Runner.new, stdout: $stdout)
  @runner = runner
  @stdout = stdout
end

Instance Attribute Details

#runnerObject (readonly)

Returns the value of attribute runner.



5
6
7
# File 'lib/jive/batch_runner.rb', line 5

def runner
  @runner
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



5
6
7
# File 'lib/jive/batch_runner.rb', line 5

def stdout
  @stdout
end

Instance Method Details

#run(tasks) ⇒ Object



12
13
14
15
16
# File 'lib/jive/batch_runner.rb', line 12

def run(tasks)
  stream_output_for(runner, tasks)
  stdout.puts "==================================================="
  print_result_for(runner)
end