Class: Hanami::Utils::IO
- Defined in:
- gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/io.rb
Overview
IO utils
Class Method Summary collapse
-
.silence_warnings { ... } ⇒ void
Decreases the level of verbosity, during the execution of the given block.
Class Method Details
.silence_warnings { ... } ⇒ void
This method returns an undefined value.
Decreases the level of verbosity, during the execution of the given block.
Revised version of ActiveSupport’s Kernel.with_warnings
implementation
Source: | on GitHub
def self.silence_warnings old_verbose = $VERBOSE $VERBOSE = nil yield ensure $VERBOSE = old_verbose end |