このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 3.1 リファレンスマニュアル

singleton method IO.console_size

console_size -> [Integer, Integer]Ruby 1.9.3 から[permalink][rdoc][edit] [added by io/console/size]

端末のサイズを [rows, columns] で返します。

io/console が利用できない場合は、IO.default_console_size の値を返します。

[SEE_ALSO] IO.default_console_size