Sha256: f08f829bcd79c1fb4b164d41887e4b5f01e385d2e99a8d56ddbc731672630bf9

Contents?: true

Size: 188 Bytes

Versions: 2

Compression:

Stored size: 188 Bytes

Contents

def capturing(stream=:stdout)
  stream = $stdout
  old_stream = stream.dup
  new_steam = StringIO.new
  stream = new_steam
  yield
  new_steam
ensure
  stream = old_stream
  new_steam
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cumuli-0.3.2 features/support/io_capture.rb
cumuli-0.3.1 features/support/io_capture.rb