Sha256: 539213da51526a22258041d2bd87722ecf539de1111dc4b67959971f741c38cf

Contents?: true

Size: 410 Bytes

Versions: 2

Compression:

Stored size: 410 Bytes

Contents

class StreamWrapper

  def stdout_override(&fnc)
    @stdout_overide_fnc = fnc
  end

  def stdout_puts(string)
    if @stdout_overide_fnc
      @stdout_overide_fnc.call(string)
    else
      $stdout.puts(string)
    end
  end

  def stdout_flush
    $stdout.flush
  end
  
  def stderr_puts(string)
    $stderr.puts(string)
  end

  def stderr_flush
    $stderr.flush
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ceedling-0.29.1 lib/ceedling/stream_wrapper.rb
ceedling-0.29.0 lib/ceedling/stream_wrapper.rb