lib/jcukeforker/worker.rb in jcukeforker-0.2.5 vs lib/jcukeforker/worker.rb in jcukeforker-0.2.6
- old
+ new
@@ -67,11 +67,12 @@
def failed?
@status.nil? || !@status
end
- def output
+ def output(format = nil)
+ format = @format if format.nil?
File.join out, "#{basename}.#{format}"
end
def stdout
File.join out, "#{basename}.stdout"
@@ -80,13 +81,12 @@
def stderr
File.join out, "#{basename}.stderr"
end
def args
- args = %W[--format #{format} --out #{output}]
+ args = Array(format).flat_map { |f| %W[--format #{f} --out #{output(f)}] }
args += @extra_args
args << feature
-
args
end
private