class Toys::Utils::Terminal

def readline

Returns:
  • (nil) - if the input is closed or at eof, or there is no input
  • (String) - the entire string including the temrinating newline
def readline
  @input_mutex.synchronize do
    begin
      input&.gets
    rescue ::IOError
      nil
    end
  end
end