tty?()
  public
  
    
    
Returns true if ios is associated with a terminal device (tty),
false otherwise.
File.new("testfile").isatty   
File.new("/dev/tty").isatty   
   
  
    Show source    
    
      static VALUE
rb_io_isatty(VALUE io)
{
    rb_io_t *fptr;
    GetOpenFile(io, fptr);
    if (isatty(fptr->fd) == 0)
        return Qfalse;
    return Qtrue;
}