open

PTY.open => [master_io, slave_file]PTY.open {|master_io, slave_file| ... } => block value Class Public methods Allocates a pty (pseudo-terminal). In the block form, yields two arguments master_io, slave_file and the value of the block is returned from open. The IO and File are both closed after the block completes if they haven't been already closed. PTY.open {|master, slave| p master #=> #<IO:masterpty:/dev/pts/1> p slave #=> #<File:/dev/pts/1&g

spawn

PTY.spawn(command_line) { |r, w, pid| ... }PTY.spawn(command_line) => [r, w, pid]PTY.spawn(command, arguments, ...) { |r, w, pid| ... }PTY.spawn(command, arguments, ...) => [r, w, pid] Class Public methods Spawns the specified command on a newly allocated pty. You can also use the alias ::getpty. The command's controlling tty is set to the slave device of the pty and its standard input/output/error is redirected to the slave device. command and command_line are the full c

new

new() Class Public methods Creates a new queue.

&lt;&lt;

<<(obj) Instance Public methods Alias of push push

clear

clear() Instance Public methods Removes all objects from the queue.

deq

deq(non_block=false) Instance Public methods Alias of pop pop

empty?

empty?() Instance Public methods Returns true if the queue is empty.

enq

enq(obj) Instance Public methods Alias of push push

length

length() Instance Public methods Returns the length of the queue. size

num_waiting

num_waiting() Instance Public methods Returns the number of threads waiting on the queue.