Project

ttyname

0.0
No commit activity in last 3 years
No release in over 3 years
ruby-ttyname adds one method (ttyname) for use with any IO instance for a TTY device.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ttyname

ttyname is a small library that lets you get the name of a tty device.

Description

ttyname adds one method (ttyname) that returns the name of the tty device of an IO instance.

Installation

Add this line to your application's Gemfile:

gem "ttyname"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install ttyname

Usage

To get the ttyname of the $stdout terminal.

require "ttyname"

name = $stdout.ttyname
puts "Your terminal is #{name}"

Contributing

Fork, branch & pull request.