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: local_environment.rb
    path of file: ./repos/newrelic-ruby-agent/lib/new_relic
    
    the code of the file until where you have to start completion: # This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

require 'set'
require 'new_relic/version'

module NewRelic
  # This class is responsible for determining the 'dispatcher' in u
    
    def check_for_resque
      has_queue = ENV['QUEUE'] || ENV['QUEUES']
      resque_rake = executable == 'rake' && ARGV.include?('resque:work')
      resque_pool_rake = executable == 'rake' && ARGV.include?('resque:pool')
      resque_pool_executable = executable == 'resque-pool' && defined?(::Resque::Pool)

      using_resque = defined?(::Resque) &&
        (has_queue && resque_rake) ||
        (resque_pool_executable || resque_pool_rake)

      @discovered_dispatcher = :resque if using_resque
    end