module RuboCop::Cop::RequireLibrary
def ensure_required(corrector, node, library_name)
def ensure_required(corrector, node, library_name) node = node.parent while node.parent&.parent? if node.parent&.begin_type? return if @required_libs.include?(library_name) remove_subsequent_requires(corrector, node, library_name) end RequireLibraryCorrector.correct(corrector, node, library_name) end