module Kernel

To silence (most) warnings from a required file

Public Instance Methods

silence_warnings() { || ... } click to toggle source
   # File lib/drupid.rb
27 def silence_warnings
28   with_warnings(nil) { yield }
29 end
with_warnings(flag) { || ... } click to toggle source
   # File lib/drupid.rb
31 def with_warnings(flag)
32   old_verbose, $VERBOSE = $VERBOSE, flag
33   yield
34 ensure
35   $VERBOSE = old_verbose
36 end