module Okay::WarningHelpers
Helper functions for suppressing warnings when we know it's okay.
Public Instance Methods
silence_warnings(&block)
click to toggle source
# File lib/okay/warning_helpers.rb, line 9 def silence_warnings(&block) with_warnings(nil, &block) end
with_warnings(flag) { || ... }
click to toggle source
# File lib/okay/warning_helpers.rb, line 13 def with_warnings(flag, &_block) old_verbose = $VERBOSE $VERBOSE = flag yield ensure $VERBOSE = old_verbose end