Sha256: be761d87914dfa240e9074fa0979659b83bcbaa7932f478be372734bdb84d149
Contents?: true
Size: 216 Bytes
Versions: 35
Compression:
Stored size: 216 Bytes
Contents
def capture(stream) begin stream = stream.to_s eval "$#{stream} = StringIO.new" yield result = eval("$#{stream}").string ensure eval("$#{stream} = #{stream.upcase}") end result.strip end
Version data entries
35 entries across 35 versions & 1 rubygems