<commit_before>module Badgeable
  module Adapters

    def self.current
      @current_adapter
    end

    def self.use(adapter)
      @current_adapter = adapter
    end

    def self.supported_adapters
      [:active_record, :mongoid]
    end

    def self.connect(klass)
      # klass.send(:include, Badgeable::Adapters::MongoidAdapter) if defined?(Mongoid) && klass.include?(::Mongoid::Document)
      # klass.send(:include, Badgeable::Adapters::ActiveRecordAdapter) if defined?(ActiveRecord) && klass.superclass == ActiveRecord::Base
      raise ArgumentError, "Badgeable needs a database adapter to work. Add one of the following to your Gemfile: #{Badgeable::Adapters.supported_adapters.map {|name| 'badgeable_' + name }}" unless Badgeable::Adapters.current && (Badgeable::Adapters.supported_adapters.include? Badgeable::Adapters.current)
      klass.send(:include, Badgeable::Adapters.const_get(Badgeable::Adapters.current.titleize + "Adapter" ))
    end
  end
end<commit_msg>:current_adapter is a class attribute; remove comments<commit_after>module Badgeable
  module Adapters

    class << self
      attr_accessor :current_adapter
    end

    def self.use(adapter)
      @current_adapter = adapter
    end

    def self.supported_adapters
      [:active_record, :mongoid]
    end

    def self.connect(klass)
      raise ArgumentError, "Badgeable needs a database adapter to work. Add one of the following to your Gemfile: #{Badgeable::Adapters.supported_adapters.map {|name| 'badgeable_' + name }}" unless Badgeable::Adapters.current && (Badgeable::Adapters.supported_adapters.include? Badgeable::Adapters.current)
      klass.send(:include, Badgeable::Adapters.const_get(Badgeable::Adapters.current.titleize + "Adapter" ))
    end
  end
end
{'fraction_non_alphanumeric': 0.10598290598290598, 'fraction_numerical': 0.0, 'mean_word_length': 4.453416149068323, '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': '2067992', 'n_tokens_mistral': 553, 'n_tokens_neox': 531, 'n_words': 119}