| Module | RHC::Helpers |
| In: |
lib/rhc/helpers.rb
|
| MAX_RETRIES | = | 7 |
| DEFAULT_DELAY_THROTTLE | = | 2.0 |
| INDENT | = | 2 |
def tee(&block)
original = [$stdout, $stderr]
$stdout, $stderr = (tees = original.map{ |io| StringTee.new(io) })
yield
ensure
$stdout, $stderr = original tees.each(&:close_write).map(&:string)
end
given an array of arrays "items", construct an array of strings that can be used to print in tabular form.
This will format table headings for a consistent look and feel
If a heading isn't explicitly defined, it will attempt to look up the parts If those aren't found, it will capitalize the string