Method: Jets::Generator.capture_stdout
- Defined in:
- lib/jets/generator.rb
.capture_stdout ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/jets/generator.rb', line 35 def capture_stdout stdout_old = $stdout io = StringIO.new $stdout = io yield $stdout = stdout_old io.string end |