Skip to content
instance method

IO#isatty

() -> bool
isatty → true or false

Returns true if the stream is associated with a terminal device (tty), false otherwise:

Example
f = File.new('t.txt').isatty    #=> false
f.close
f = File.new('/dev/tty').isatty #=> true
f.close
See also #ioflush #lineno #ioctl #lineno= also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0