Sha256: b17c986b5f1b7ffead7852ee39a46a58b3e6ee210a96443bf0406f50a9269294

Contents?: true

Size: 219 Bytes

Versions: 6

Compression:

Stored size: 219 Bytes

Contents

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rtm-0.1.3 lib/rtm/helpers.rb
rtm-0.1.0 lib/rtm/helpers.rb
rtm-0.1.1 lib/rtm/helpers.rb
rtm-0.1.4 lib/rtm/helpers.rb
rtm-0.1.5 lib/rtm/helpers.rb
rtm-0.1.6 lib/rtm/helpers.rb