Sha256: 4f3c8143fd74f57da866d6ab2d916b0963740536edc27f8e4a1bad5239548dd4

Contents?: true

Size: 174 Bytes

Versions: 1

Compression:

Stored size: 174 Bytes

Contents

require 'stringio'
 
module Kernel
 
  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    return out.string
  ensure
    $stdout = STDOUT
  end
 
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iron-extensions-1.0.0 lib/iron/extensions/kernel.rb