class RuboCop::Cop::Registry
def self.with_temporary_global(temp_global = global.dup)
Changes momentarily the global registry
def self.with_temporary_global(temp_global = global.dup) previous = @global @global = temp_global yield ensure @global = previous end