Method: Cisco::Client.silence_warnings

Defined in:
lib/cisco_node_utils/client/utils.rb

.silence_warnings(&block) ⇒ Object

Helper method for calls into third-party code - suppresses Ruby warnings for the given block since we have no control over that code.



173
174
175
176
177
178
179
# File 'lib/cisco_node_utils/client/utils.rb', line 173

def self.silence_warnings(&block)
  warn_level = $VERBOSE
  $VERBOSE = nil
  result = block.call
  $VERBOSE = warn_level
  result
end