method

nread

ruby latest stable - Class: IO
nread()
public

Returns number of bytes that can be read without blocking. Returns zero if no information available.