<commit_before>module GitHub
  class Ldap
    module MembershipValidators
      # Validates membership using the `Domain#membership` lookup method.
      #
      # This is a simple wrapper for existing functionality in order to expose
      # it consistently with the new approach.
      class Classic < Base
        def perform(entry)
          return true if groups.empty?

          domains.each do |domain|
            membership = domain.membership(entry, group_names)

            if !membership.empty?
              entry[:groups] = membership
              return true
            end
          end

          false
        end

        # Internal: the group names to look up membership for.
        #
        # Returns an Array of String group names (CNs).
        def group_names
          @group_names ||= groups.map { |g| g[:cn].first }
        end
      end
    end
  end
end
<commit_msg>Refer to full class name in docs<commit_after>module GitHub
  class Ldap
    module MembershipValidators
      # Validates membership using `GitHub::Ldap::Domain#membership`.
      #
      # This is a simple wrapper for existing functionality in order to expose
      # it consistently with the new approach.
      class Classic < Base
        def perform(entry)
          return true if groups.empty?

          domains.each do |domain|
            membership = domain.membership(entry, group_names)

            if !membership.empty?
              entry[:groups] = membership
              return true
            end
          end

          false
        end

        # Internal: the group names to look up membership for.
        #
        # Returns an Array of String group names (CNs).
        def group_names
          @group_names ||= groups.map { |g| g[:cn].first }
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06053935057787562, 'fraction_numerical': 0.0, 'mean_word_length': 1.7462235649546827, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4816361', 'n_tokens_mistral': 460, 'n_tokens_neox': 452, 'n_words': 171}