Module: GitCheckCI::Silencer

Included in:
Server
Defined in:
lib/git-check-ci/silencer.rb

Instance Method Summary collapse

Instance Method Details

#silencing(stream) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/git-check-ci/silencer.rb', line 4

def silencing(stream)
  old_stream = stream.dup
  stream.reopen('/dev/null')
  stream.sync = true
  yield
ensure
  stream.reopen(old_stream)
end