Sha256: b5a3493197705937e6af456ede31315aed45d842272bcd00519cfb7720d7470c
Contents?: true
Size: 381 Bytes
Versions: 6
Compression:
Stored size: 381 Bytes
Contents
# -*- encoding: utf-8 -*- require 'rubygems' require 'webmock/rspec' require 'gem-search' # http://d.hatena.ne.jp/POCHI_BLACK/20100324 # this method is written by wycats def capture(stream) begin stream = stream.to_s eval "$#{stream} = StringIO.new" yield result = eval("$#{stream}").string ensure eval("$#{stream} = #{stream.upcase}") end result end
Version data entries
6 entries across 6 versions & 1 rubygems