Parent

Methods

CI::Reporter::OutputCapture

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

Public Class Methods

new(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 13
def initialize(io, &assign)
  super
  @delegate_io = io
  @captured_io = StringIO.new
  @assign_block = assign
  @assign_block.call self
end

Public Instance Methods

finish() click to toggle source

Finalize the capture and reset to the original IO object.

# File lib/ci/reporter/test_suite.rb, line 22
def finish
  @assign_block.call @delegate_io
  @captured_io.string
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.