<commit_before>require 'tww/version'
require 'tww/config'
require 'tww/client'
require 'tww/rest'
require 'tww/testing'

module TWW
  # TODO Is this line necessary?
  attr_accessor :config

  def self.config
    @config ||= Config.new
    @config.tap { |config|  yield(config) if block_given? }
  end

  def self.client
    @factory.new.tap { |client| client.config = config }
  end

  def self.enable_testing!
    @factory = TWW::Testing
  end

  def self.disable_testing!
    @factory = TWW::REST
  end
end

TWW.disable_testing!<commit_msg>Remove unused method<commit_after>require 'tww/version'
require 'tww/config'
require 'tww/client'
require 'tww/rest'
require 'tww/testing'

module TWW
  def self.config
    @config ||= Config.new
    @config.tap { |config|  yield(config) if block_given? }
  end

  def self.client
    @factory.new.tap { |client| client.config = config }
  end

  def self.enable_testing!
    @factory = TWW::Testing
  end

  def self.disable_testing!
    @factory = TWW::REST
  end
end

TWW.disable_testing!
{'fraction_non_alphanumeric': 0.1132623426911907, 'fraction_numerical': 0.0, 'mean_word_length': 3.575221238938053, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4277147', 'n_tokens_mistral': 377, 'n_tokens_neox': 361, 'n_words': 90}