I have a pipe opened.
Eg.
PTY.spawn('screen -x') do |read, write, pid|
# code
end
After several writes I want to empty the read so when I use:
read.each do |line|
# code
end
it will start to read from that point I emptied it.
How do you do this?