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: badge.rb
    path of file: ./repos/rails-mini-profiler/lib/rails_mini_profiler
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative '../../app/
    
    def modified_body
      body = @original_response.body
      index = body.rindex(%r{</body>}i) || body.rindex(%r{</html>}i)
      if index
        body.dup.insert(index, badge_content)
      else
        body
      end