123456789_123456789_123456789_123456789_123456789_

Module: Rake::TraceOutput

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rake/trace_output.rb

Instance Method Summary

Instance Method Details

#trace_on(out, *strings)

Write trace output to output stream out.

The write is done as a single IO call (to print) to lessen the chance that the trace output is interrupted by other tasks also producing output.

[ GitHub ]

  
# File 'lib/rake/trace_output.rb', line 10

def trace_on(out, *strings)
  sep = $\ || "\n"
  if strings.empty?
    output = sep
  else
    output = strings.map { |s|
      next if s.nil?
      s.end_with?(sep) ? s : s + sep
    }.join
  end
  out.print(output)
end