Sha256: 58936e581e583c33428c0c582d2b3e65d057bb1a3af109c3c3b782047ab6cbab
Contents?: true
Size: 359 Bytes
Versions: 6
Compression:
Stored size: 359 Bytes
Contents
# coding: utf-8 module CaptureStd def capture_stderr err, $stderr = $stderr, StringIO.new yield $stderr.string ensure $stderr = err end def capture_stdout out, $stdout = $stdout, StringIO.new yield $stdout.string ensure $stdout = out end def silence_stderr(&block) silence_stream($stderr, &block) end end
Version data entries
6 entries across 6 versions & 1 rubygems