class Rex::Ui::Text::Input::Stdio

This class implements input against standard in.

Public Instance Methods

eof?() click to toggle source

Returns whether or not EOF has been reached on stdin.

# File lib/rex/ui/text/input/stdio.rb, line 31
def eof?
  $stdin.closed?
end
fd() click to toggle source

Returns the file descriptor associated with standard input.

# File lib/rex/ui/text/input/stdio.rb, line 38
def fd
  return $stdin
end
gets() click to toggle source

Wait for a line of input to be read from standard input.

# File lib/rex/ui/text/input/stdio.rb, line 24
def gets
  return $stdin.gets
end
sysread(len = 1) click to toggle source

Reads text from standard input.

# File lib/rex/ui/text/input/stdio.rb, line 17
def sysread(len = 1)
  $stdin.sysread(len)
end