Method: MmTool::OutputHelper.console_width

Defined in:
lib/mm_tool/output_helper.rb

.console_widthObject


Gather the basic dimensions required for output. We’ll support a minimum width of 60, which is reasonable for any modern console, and allows enough room for fairly long argument examples. If STDOUT is not to a console, then adjust to 80 columns.




88
89
90
# File 'lib/mm_tool/output_helper.rb', line 88

def self.console_width
  $stdout.tty? ? [TTY::Screen.width, 60].max : 80
end