Sha256: 83d6674a016f848c50a702a688df2d55e7b97f6d299cf47346a7f097c2bffecf
Contents?: true
Size: 231 Bytes
Versions: 2
Compression:
Stored size: 231 Bytes
Contents
require 'stringio' # http://thinkingdigitally.com/archive/capturing-output-from-puts-in-ruby/ module Kernel def capture_stdout out = StringIO.new $stdout = out yield out ensure $stdout = STDOUT end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cutter-0.8.9 | lib/cutter/kernel.rb |
cutter-0.8.8 | lib/cutter/kernel.rb |