Sha256: f346b154f7881af15661897555d49d95784873fd85c38c2f76bb106431b95f41

Contents?: true

Size: 318 Bytes

Versions: 10

Compression:

Stored size: 318 Bytes

Contents

module Kernel
  def silence_stdout_if(cond, &run)
    silence_stream_if(cond, STDOUT, &run)
  end

  def silence_stderr_if(cond, &run)
    silence_stream_if(cond, STDERR, &run)
  end

  def silence_stream_if(cond, stream, &run)
    if cond
      silence_stream(stream, &run)
    else
      run.call
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
envvy-1.0.10 test/support/reporting.rb
envvy-1.0.9 test/support/reporting.rb
envvy-1.0.8 test/support/reporting.rb
envvy-1.0.7 test/support/reporting.rb
envvy-1.0.6 test/support/reporting.rb
envvy-1.0.5 test/support/reporting.rb
envvy-1.0.4 test/support/reporting.rb
envvy-1.0.3 test/support/reporting.rb
envvy-1.0.2 test/support/reporting.rb
envvy-1.0.1 test/support/reporting.rb