New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tty-screen

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty-screen

  • 0.8.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source
TTY Toolkit logo

TTY::Screen

Gem Version Actions CI Build status Code Climate Coverage Status

Terminal screen size detection that works on Linux, macOS and Windows systems and supports Ruby MRI, JRuby, TruffleRuby and Rubinius interpreters.

TTY::Screen provides a terminal screen size detection component for the TTY toolkit.

Installation

Add this line to your application's Gemfile:

gem "tty-screen"

And then execute:

$ bundle

Or install it yourself as:

$ gem install tty-screen

1. Usage

Use the size method to detect terminal screen size. It will result in a [height, width] array:

TTY::Screen.size  # => [51, 280]

Use the width, columns or cols method to detect terminal screen width:

TTY::Screen.width    # => 280
TTY::Screen.columns  # => 280
TTY::Screen.cols     # => 280

Use the height, lines or rows method to detect terminal screen height:

TTY::Screen.height  # => 51
TTY::Screen.lines   # => 51
TTY::Screen.rows    # => 51

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

  1. Fork it ( https://github.com/piotrmurach/tty-screen/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the TTY::Screen project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Copyright (c) 2014 Piotr Murach. See LICENSE.txt for further details.

FAQs

Package last updated on 17 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc