mirror of
https://github.com/twbs/bootstrap-sass.git
synced 2022-11-09 12:27:02 -05:00
18 lines
317 B
Ruby
18 lines
317 B
Ruby
![]() |
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
|