-
Notifications
You must be signed in to change notification settings - Fork 1
webmat/capture_fu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
capture_fu is a small library that facilitates capture of stdout and stderr outputs. This can be useful for testing console output of command-line tools or to wrap the use of another command-line tool inside your program. Usage Let's simply go by example: out = capture_output{ puts 'normal output' ; $stderr.puts 'error' ; 'the return value of the block' } #=> ["the return value of the block", "normal output\n", "error\n"] Or if you prefer: ret, out, err = capture_output{ puts 'normal output' ; $stderr.puts 'error' ; 'the return value of the block' } Note that the output generated inside capture_output's block is not displayed at the console. Installation gem install webmat-capture_fu --source=http://gems.github.com and require 'capture_fu' Authors - Mathieu Martin, [email protected]
About
capture_fu facilitates the capture of stdout and stderr output
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published