method
capture2e
v2_2_9 -
Show latest stable
-
0 notes -
Class: Open3
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180 (0)
- 1_9_3_125 (-2)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (38)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
capture2e(*cmd, stdin_data: nil, binmode: false, **opts)
private
Open3.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 Open3.popen3 except opts[:stdin_data] and opts[:binmode]. See Process.spawn.
If opts[:stdin_data] is specified, it is sent to the command’s standard input.
If opts[:binmode] is true, internal pipes are set to binary mode.
Example:
# capture make log make_log, s = Open3.capture2e("make")