Have you ever noticed that if you run rake -T in rails the list of rake descriptions are truncated by the width of the terminal window. So there should be a way to get it in Rub
require 'io/console' puts "Rows by columns: #{IO.console.winsize}" puts "Ruby 2.6.4"