Top Level Namespace

Defined Under Namespace

Classes: RstukFuu, SSHFail, Shell

Instance Method Summary collapse

Instance Method Details

#terminal_widthObject

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

Returns:

  • (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