Method: Thor::Shell::Basic#terminal_width
- Defined in:
- lib/thor/shell/basic.rb
#terminal_width ⇒ Object
This code was copied from Rake, available under MIT-LICENSE Copyright © 2003, 2004 Jim Weirich
273 274 275 276 277 278 279 280 281 282 |
# File 'lib/thor/shell/basic.rb', line 273 def terminal_width if ENV["THOR_COLUMNS"] result = ENV["THOR_COLUMNS"].to_i else result = unix? ? dynamic_width : 80 end result < 10 ? 80 : result rescue 80 end |