Skip to content
instance method

IO#ttyname

io.ttyname → string or nil

Returns name of associated terminal (tty) if io is not a tty. Returns nil otherwise.

See also #tty? #ungetbyte #to_path #ungetc also in 4.1 · 3.4