Top Level Namespace
Defined Under Namespace
Classes: RstukFuu, SSHFail, Shell
Instance Method Summary collapse
-
#terminal_width ⇒ Object
This code was copied and modified from Rake, available under MIT-LICENSE Copyright © 2003, 2004 Jim Weirich.
- #unix? ⇒ Boolean
Instance Method Details
#terminal_width ⇒ Object
This code was copied and modified from Rake, available under MIT-LICENSE Copyright © 2003, 2004 Jim Weirich
13 14 15 16 17 18 19 20 |
# File 'lib/rstuk/formatters/rstukfuu.rb', line 13 def terminal_width return 80 unless unix? result = dynamic_width (result < 20) ? 80 : result rescue 80 end |
#unix? ⇒ Boolean
43 44 45 |
# File 'lib/rstuk/formatters/rstukfuu.rb', line 43 def unix? RUBY_PLATFORM =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i end |