Method: Kennel::Console.capture_stdout

Defined in:
lib/kennel/console.rb

.capture_stdoutObject



34
35
36
37
38
39
40
41
# File 'lib/kennel/console.rb', line 34

def capture_stdout
  old = Kennel.out
  Kennel.out = StringIO.new
  yield
  Kennel.out.string
ensure
  Kennel.out = old
end