capture2e

capture2e(*cmd)
Class Public methods

::capture2e captures the standard output and the standard error of a command.

stdout_and_stderr_str, status = Open3.capture2e([env,] cmd... [, opts])

The arguments env, cmd and opts are passed to ::popen3 except opts and opts. See Process.spawn.

If opts is specified, it is sent to the command's standard input.

If opts is true, internal pipes are set to binary mode.

Example:

# capture make log
make_log, s = Open3.capture2e("make")
doc_ruby_on_rails
2015-04-24 14:47:09
Comments
Leave a Comment

Please login to continue.