Sha256: 39cc4bfc92265f0f98f5e0b52f596dc6551e5b96c527eabd815164fa635fcd71

Contents?: true

Size: 334 Bytes

Versions: 1

Compression:

Stored size: 334 Bytes

Contents

# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
# License:   Apache License, Version 2.0

# Executes the given block while suppressing all standard output.
def no_output
  $stdout = File.open( PLATFORM =~ /mswin|mingw/ ? "NUL" : "/dev/null", "w" )
  yield if block_given?
  $stdout.close
  $stdout = STDOUT
end
    

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rtm-0.3.1 lib/rtm/helpers/no_output.rb