You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: delete_suffix.rb
    path of file: ./repos/rubocop-performance/lib/rubocop/cop/performance
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Cop
    module Performance
      # In Ruby 2.5, `String#delete_suffix` has been added.
      #
      # This cop identifies places where `gsub(/suffix\z/, '')` and `sub(/suffix\z/, '')`
      # can be replaced by `delete_suffix('suffix')`.
      #
      # This cop has `SafeMultiline` configuration option that `true` by default because
      # `suffix$` is unsafe as it will behave incompatible with `delete_suffix?`
      # for receiver is multiline s
    
        def on_send(node)
          return unless (receiver, bad_method, regexp_str, replace_string = delete_suffix_candidate?(node))
          return unless replace_string.empty?

          good_method = PREFERRED_METHODS[bad_method]

          message = format(MSG, current: bad_method, prefer: good_method)

          add_offense(node.loc.selector, message: message) do |corrector|
            regexp_str = drop_end_metacharacter(regexp_str)
            regexp_str = interpret_string_escapes(regexp_str)
            string_literal = to_string_literal(regexp_str)

            new_code = "#{receiver.source}#{node.loc.dot.source}#{good_method}(#{string_literal})"

            corrector.replace(node, new_code)
          end
        end