Sha256: bc6402ba18026be974d9b8d69143753475ec1b5c4caa1e9d4cf99459088d0ef0
Contents?: true
Size: 345 Bytes
Versions: 3
Compression:
Stored size: 345 Bytes
Contents
class Deadweight module Hijack def self.redirect_output(log_file_prefix) original_stdout, original_stderr = STDOUT.clone, STDERR.clone STDOUT.reopen(File.open("#{log_file_prefix}stdout.log", 'w')) STDERR.reopen(File.open("#{log_file_prefix}stderr.log", 'w')) [original_stdout, original_stderr] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
deadweight-0.2.2 | lib/deadweight/hijack.rb |
deadweight-0.2.1 | lib/deadweight/hijack.rb |
deadweight-0.2.0 | lib/deadweight/hijack.rb |