Class: Common::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/common/utils.rb

Class Method Summary collapse

Class Method Details

.suppress_warningsObject

Suppress all warnings raised within the block of code. i.e. suppress_warnings { code_that_raise_warnings }



28
29
30
31
32
33
34
# File 'lib/common/utils.rb', line 28

def self.suppress_warnings
  v = $VERBOSE
  $VERBOSE = nil
  yield
ensure
  $VERBOSE = v
end