Project

silent

0.0
No commit activity in last 3 years
No release in over 3 years
Temporary disable stdout/stderr while you execute a piece of code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.7
~> 10.3
~> 0.8
~> 2.5
 Project Readme

silent

Build Status Gem Version Coverage Status Inline docs

silent is a Ruby gem to silently execute a piece of code, that is, without any visible output.

Install

gem install silent

Usage

require 'silent'

silent(:stdout) do
  puts "this will never be displayed"
end

silent(:stderr) do
  # do bad things without apparent warnings
  ARGV = 42
end

silent(:stdout, :stderr) do
  puts "Everything is silent here"
  $stderr.write "is anyone listening to me?"
end

Tests

$ git clone https://github.com/bfontaine/silent.git
$ cd silent
$ bundle install
$ bundle exec rake test