<commit_before>module Minitext
  autoload :Message, 'minitext/message'
  autoload :MissingParameter, 'minitext/missing_parameter'
  autoload :TestGateway, 'minitext/test_gateway'
  autoload :TwilioGateway, 'minitext/twilio_gateway'
  autoload :WhitelistProxy, 'minitext/whitelist_proxy'

  @@gateway  = TestGateway.new
  @@defaults = {}

  def self.gateway
    @@gateway
  end

  def self.gateway=(gateway)
    @@gateway = gateway
  end

  def self.defaults
    {gateway: @@gateway}.merge(@@defaults)
  end

  def self.defaults=(defaults)
    @@defaults = defaults
  end

  def self.text(params)
    Message.new(defaults.merge(params))
  end
end

if defined?(Rails)
  require 'minitext/railtie'
end<commit_msg>Changed class variables to instance variables.<commit_after>module Minitext
  autoload :Message, 'minitext/message'
  autoload :MissingParameter, 'minitext/missing_parameter'
  autoload :TestGateway, 'minitext/test_gateway'
  autoload :TwilioGateway, 'minitext/twilio_gateway'
  autoload :WhitelistProxy, 'minitext/whitelist_proxy'

  def self.gateway
    @gateway ||= TestGateway.new
  end

  def self.gateway=(gateway)
    @gateway = gateway
  end

  def self.defaults
    {gateway: gateway}.merge(@defaults)
  end

  def self.defaults=(defaults)
    @defaults = defaults
  end

  def self.text(params)
    Message.new(defaults.merge(params))
  end
end

if defined?(Rails)
  require 'minitext/railtie'
end
{'fraction_non_alphanumeric': 0.1058574453069866, 'fraction_numerical': 0.0, 'mean_word_length': 4.432950191570881, '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': '7100542', 'n_tokens_mistral': 512, 'n_tokens_neox': 497, 'n_words': 100}