capture3

capture3(*cmd) Class Public methods ::capture3 captures the standard output and the standard error of a command. stdout_str, stderr_str, status = Open3.capture3([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: # dot is a command of graphviz. graph = <<'End' digraph g { a

pipeline

pipeline(*cmds) Class Public methods ::pipeline starts a list of commands as a pipeline. It waits the finish of the commands. No pipe made for stdin of the first command and stdout of the last command. status_list = Open3.pipeline(cmd1, cmd2, ... [, opts]) Each cmd is a string or an array. If it is an array, the elements are passed to Process.spawn. cmd: commandline command line string which is passed to a shell [env, commandline, opts]

pipeline_r

pipeline_r(*cmds, &block) Class Public methods ::pipeline_r starts a list of commands as a pipeline with a pipe which connects stdout of the last command. Open3.pipeline_r(cmd1, cmd2, ... [, opts]) {|last_stdout, wait_threads| ... } last_stdout, wait_threads = Open3.pipeline_r(cmd1, cmd2, ... [, opts]) ... last_stdout.close Each cmd is a string or an array. If it is an array, the elements are passed to Process.spawn. cmd: commandline command li

pipeline_rw

pipeline_rw(*cmds, &block) Class Public methods ::pipeline_rw starts a list of commands as a pipeline with pipes which connects stdin of the first command and stdout of the last command. Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) {|first_stdin, last_stdout, wait_threads| ... } first_stdin, last_stdout, wait_threads = Open3.pipeline_rw(cmd1, cmd2, ... [, opts]) ... first_stdin.close last_stdout.close Each cmd is a string or an array. If it is an array, the elements are passe

pipeline_start

pipeline_start(*cmds, &block) Class Public methods ::pipeline_start starts a list of commands as a pipeline. No pipe made for stdin of the first command and stdout of the last command. Open3.pipeline_start(cmd1, cmd2, ... [, opts]) {|wait_threads| ... } wait_threads = Open3.pipeline_start(cmd1, cmd2, ... [, opts]) ... Each cmd is a string or an array. If it is an array, the elements are passed to Process.spawn. cmd: commandline command line str

pipeline_w

pipeline_w(*cmds, &block) Class Public methods ::pipeline_w starts a list of commands as a pipeline with a pipe which connects stdin of the first command. Open3.pipeline_w(cmd1, cmd2, ... [, opts]) {|first_stdin, wait_threads| ... } first_stdin, wait_threads = Open3.pipeline_w(cmd1, cmd2, ... [, opts]) ... first_stdin.close Each cmd is a string or an array. If it is an array, the elements are passed to Process.spawn. cmd: commandline command li

popen2

popen2(*cmd, &block) Class Public methods ::popen2 is similer to ::popen3 except it doesn't make a pipe for the standard error stream. Block form: Open3.popen2([env,] cmd... [, opts]) {|stdin, stdout, wait_thr| pid = wait_thr.pid # pid of the started process. ... exit_status = wait_thr.value # Process::Status object returned. } Non-block form: stdin, stdout, wait_thr = Open3.popen2([env,] cmd... [, opts]) ... stdin.close # stdin and stdout should be closed explicitly in

popen2e

popen2e(*cmd, &block) Class Public methods ::popen2e is similer to ::popen3 except it merges the standard output stream and the standard error stream. Block form: Open3.popen2e([env,] cmd... [, opts]) {|stdin, stdout_and_stderr, wait_thr| pid = wait_thr.pid # pid of the started process. ... exit_status = wait_thr.value # Process::Status object returned. } Non-block form: stdin, stdout_and_stderr, wait_thr = Open3.popen2e([env,] cmd... [, opts]) ... stdin.close # stdin an

popen3

popen3(*cmd, &block) Class Public methods Open stdin, stdout, and stderr streams and start external executable. In addition, a thread for waiting the started process is noticed. The thread has a pid method and thread variable :pid which is the pid of the started process. Block form: Open3.popen3([env,] cmd... [, opts]) {|stdin, stdout, stderr, wait_thr| pid = wait_thr.pid # pid of the started process. ... exit_status = wait_thr.value # Process::Status object returned. } N

new

OpenSSL::ASN1::ASN1Data.new(value, tag, tag_class) => ASN1Data Class Public methods value: Please have a look at Constructive and Primitive to see how Ruby types are mapped to ASN.1 types and vice versa. tag: A Number indicating the tag number. tag_class: A Symbol indicating the tag class. Please cf. ASN1 for possible values. Example asn1_int = OpenSSL::ASN1Data.new(42, 2, :UNIVERSAL) # => Same as OpenSSL::ASN1::Integer.new(42) tagged_int = OpenSSL::ASN1Data.new(42, 0, :CONT