Task

Demonstrate how to check whether the output device is a terminal or not.



Related task

   Check input device is a terminal


f = File.open("test.txt")
p f.isatty          # => false
p STDOUT.isatty     # => true
 