Method: HighLine#output_cols
- Defined in:
- lib/highline.rb
#output_cols ⇒ Object
Returns the number of columns for the console, or a default it they cannot be determined.
475 476 477 478 479 480 |
# File 'lib/highline.rb', line 475 def output_cols return 80 unless @output.tty? terminal.terminal_size.first rescue NoMethodError return 80 end |