Emulates/delegates IO to $stdout or $stderr in order to capture output to report in the XML file.

Public Class Methods

wrap(io, &assign) click to toggle source
# File lib/ci/reporter/test_suite.rb, line 20
def self.wrap(io, &assign)
  if defined?(RUBY_ENGINE) # JRuby, Ruby 1.9, etc., &assign)
  else          # Ruby 1.8 requires streams to be subclass of IO, "w").tap {|x| x.extend self; x.capture(io, &assign) }

Public Instance Methods

capture(io, &assign) click to toggle source

Start capturing IO, using the given block to assign self to the proper IO global.

# File lib/ci/reporter/test_suite.rb, line 29
def capture(io, &assign)
  @delegate_io = io
  @captured_io =
  @assign_block = assign @captured_io
finish() click to toggle source

Finalize the capture and reset to the original IO object.

# File lib/ci/reporter/test_suite.rb, line 37
def finish @delegate_io


Generated with the Darkfish Rdoc Generator 2.