Class: A4Tools::StandardInput
- Inherits:
-
Object
- Object
- A4Tools::StandardInput
- Defined in:
- lib/net_shell/io.rb
Instance Method Summary collapse
Instance Method Details
#read ⇒ Object
100 101 102 103 104 105 106 107 108 |
# File 'lib/net_shell/io.rb', line 100 def read begin STDIN.read_nonblock(256) rescue IO::WaitReadable "" rescue EOFError nil end end |
#read_all ⇒ Object
110 111 112 113 114 115 116 |
# File 'lib/net_shell/io.rb', line 110 def read_all buffer = "" while (line = read) != nil buffer += line end buffer.chomp end |