Top Level Namespace
Defined Under Namespace
Modules: OrgMode Classes: String
Instance Method Summary collapse
Instance Method Details
#capture_stdout ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/capture_stdout.rb', line 3 def capture_stdout out = StringIO.new old_stdout = $stdout $stdout = out yield out.rewind return out.read ensure $stdout = old_stdout end |