How to get the terminal window's size in Ruby

```ruby require 'io/console' IO.console.winsize ``` In the terminal you can use **tput cols**.