| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Open3/ |
Upload File : |
U:RDoc::AnyMethod[iI"
capture2:EFI"Open3#capture2;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I">Open3.capture2 captures the standard output of a command.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"Astdout_str, status = Open3.capture2([env,] cmd... [, opts])
;T:@format0o;
; [I"GThe arguments env, cmd and opts are passed to Open3.popen3 except ;TI"X<code>opts[:stdin_data]</code> and <code>opts[:binmode]</code>. See Process.spawn.;T@o;
; [I"`If <code>opts[:stdin_data]</code> is specified, it is sent to the command's standard input.;T@o;
; [I"SIf <code>opts[:binmode]</code> is true, internal pipes are set to binary mode.;T@o;
; [I"
Example:;T@o;; [I"6# factor is a command for integer factorization.
;TI"8o, s = Open3.capture2("factor", :stdin_data=>"42")
;TI"p o #=> "42: 2 3 7\n"
;TI"
;TI"1# generate x**2 graph in png using gnuplot.
;TI" gnuplot_commands = <<"End"
;TI" set terminal png
;TI"! plot x**2, "-" with lines
;TI" 1 14
;TI" 2 1
;TI" 3 8
;TI" 4 5
;TI" e
;TI" End
;TI"Ximage, s = Open3.capture2("gnuplot", :stdin_data=>gnuplot_commands, :binmode=>true);T;
0:
@fileI"lib/open3.rb;T:0@omit_headings_from_table_of_contents_below000[ I"4(*cmd, stdin_data: nil, binmode: false, **opts);T@0FI"
Open3;FcRDoc::NormalModule00