<commit_before>module PugBot
  # This class is an object for each queue for each gametype that contains the
  # players, the list of games related to that queue and all associated
  # features.
  class Queue
    # @return [String] The name of the queue
    attr_reader :name

    # @return [Array<Game>] All the games being played in this queue
    attr_reader :games

    # @return [QueueList] The list of all the queues
    attr_reader :queue_list

    # @return [Array<Cinch::User>] The list of all the users in the queue
    attr_reader :users

    # Create a new queue in a queue list, should never be called directly,
    # should always be called with QueueList.new_queue
    # @param [QueueList] queue_list The list of queues this is being created in
    # @param [String] name The name of this queue
    # @param [Integer] max The number of players required to start a game
    # @see QueueList.new_queue
    def initialize(queue_list, name, max)
      @name = name
      @max = max
      @users = []
      @wait = []
      @games = []
      @queue_list = queue_list
    end

    # Removed method join

    # Leave a queue, by testing if we can then removing ourselves.
    # @param [Cinch::User] user The user to try joining with
    # @return [Symbol] The status of our attempt to leave
    def leave(user)
      return :already_playing if ingame?(user)
      return :not_queued unless listed?(user)
      remove(user)
      :removed
    end

    # Test if a user is in this queue.
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in the queue or not
    def listed?(user)
      @users.include?(user)
    end

    # Add a user to this queue and start tracking them.
    # @param [Cinch::User] user The user to add
    def add(user)
      @users.push(user)
      user.track = true
      ready
    end

    # Test if a user is in the wait queue.
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in the wait queue or not
    def listed_wait?(user)
      @wait.include?(user)
    end

    # Test if a user is either in the queue or the wait queue
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in either queue or not
    def listed_either?(user)
      listed_wait?(user) or listed?(user)
    end
<commit_msg>Remove unused method queue.leave<commit_after>module PugBot
  # This class is an object for each queue for each gametype that contains the
  # players, the list of games related to that queue and all associated
  # features.
  class Queue
    # @return [String] The name of the queue
    attr_reader :name

    # @return [Array<Game>] All the games being played in this queue
    attr_reader :games

    # @return [QueueList] The list of all the queues
    attr_reader :queue_list

    # @return [Array<Cinch::User>] The list of all the users in the queue
    attr_reader :users

    # Create a new queue in a queue list, should never be called directly,
    # should always be called with QueueList.new_queue
    # @param [QueueList] queue_list The list of queues this is being created in
    # @param [String] name The name of this queue
    # @param [Integer] max The number of players required to start a game
    # @see QueueList.new_queue
    def initialize(queue_list, name, max)
      @name = name
      @max = max
      @users = []
      @wait = []
      @games = []
      @queue_list = queue_list
    end

    # Removed method join

    # Removed method leave

    # Test if a user is in this queue.
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in the queue or not
    def listed?(user)
      @users.include?(user)
    end

    # Add a user to this queue and start tracking them.
    # @param [Cinch::User] user The user to add
    def add(user)
      @users.push(user)
      user.track = true
      ready
    end

    # Test if a user is in the wait queue.
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in the wait queue or not
    def listed_wait?(user)
      @wait.include?(user)
    end

    # Test if a user is either in the queue or the wait queue
    # @param [Cinch::User] user The user to test for
    # @return [Boolean] Whether they are in either queue or not
    def listed_either?(user)
      listed_wait?(user) or listed?(user)
    end

{'fraction_non_alphanumeric': 0.07575413926060331, 'fraction_numerical': 0.0, 'mean_word_length': 2.6842105263157894, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '765982', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1290, 'n_words': 584}