Module: DeepCover::Tools::SilenceWarnings
- Defined in:
- lib/deep_cover/tools/silence_warnings.rb
Instance Method Summary collapse
-
#silence_warnings ⇒ Object
copied from: activesupport/lib/active_support/core_ext/kernel/reporting.rb.
- #with_warnings(flag) ⇒ Object
Instance Method Details
#silence_warnings ⇒ Object
copied from: activesupport/lib/active_support/core_ext/kernel/reporting.rb
6 7 8 |
# File 'lib/deep_cover/tools/silence_warnings.rb', line 6 def silence_warnings with_warnings(nil) { yield } end |
#with_warnings(flag) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/deep_cover/tools/silence_warnings.rb', line 10 def with_warnings(flag) old_verbose = $VERBOSE $VERBOSE = flag yield ensure $VERBOSE = old_verbose end |