Currently:
if buffer_output
{
code: ret_code.exitstatus,
stderr: buffers[:stderr],
stdout: buffers[:stdout],
all: buffers[:all]
}
else
ret_code.exitstatus
end
Should be:
if buffer_output
Justrun::Result.new ret_code.exitstatus
else
Justrun::BufferedResult.new ret_code.exitstatus, stdout, stderr, all
end
class Justrun::BufferedResult
attr_reader :exit_status, :stdout, :stderr, :all
def initialize exit_status, stdout, stderr, all
@exit_status, @stdout, @stderr, @all = exit_status, stdout, stderr, all
end
end
Don't forget about the specs.
Currently:
Should be:
Don't forget about the specs.