Module: FancyIrb::TerminalInfo

Defined in:
lib/fancy_irb/terminal_info.rb

Class Method Summary collapse

Class Method Details

.colsObject



11
12
13
14
15
# File 'lib/fancy_irb/terminal_info.rb', line 11

def self.cols
  STDOUT.winsize[1]
rescue Errno::ENOTTY
  ENV['COLUMNS'] || 80
end

.linesObject



5
6
7
8
9
# File 'lib/fancy_irb/terminal_info.rb', line 5

def self.lines
  STDOUT.winsize[0]
rescue Errno::ENOTTY
  ENV['LINES'] || ENV['ROWS'] || 25
end