class RuboCop::Cop::Lint::MissingCopEnableDirective
def on_new_investigation
def on_new_investigation each_missing_enable do |cop, line_range| next if acceptable_range?(cop, line_range) range = source_range(processed_source.buffer, line_range.min, (0..0)) comment = processed_source.comment_at_line(line_range.begin) add_offense(range, message: message(cop, comment)) end end