Class: Taeval::Executor
Instance Method Summary
collapse
Methods included from FileHelper
#create, #exist?, #flatten_include!, #open, #path_of
Constructor Details
#initialize(config, output, reporter) ⇒ Executor
Returns a new instance of Executor.
8
9
10
11
12
13
|
# File 'lib/taeval/executor.rb', line 8
def initialize(config, output, reporter)
@config = config
@reporter = reporter
@output = output
@runners = {}
end
|
Instance Method Details
#add(runner) ⇒ Object
15
16
17
18
19
|
# File 'lib/taeval/executor.rb', line 15
def add(runner)
conf = @config[runner.to_s]
['solution', 'report', 'verbose'].each { |key| conf[key] = @config[key] }
@runners[runner] = RunnerFactory.create(runner, conf, @output, @reporter)
end
|
#run ⇒ Object
21
22
23
|
# File 'lib/taeval/executor.rb', line 21
def run
@runners.each_pair { |_, runner| runner.run }
end
|
#save ⇒ Object
25
26
27
|
# File 'lib/taeval/executor.rb', line 25
def save
@reporter.save
end
|