<commit_before>require "impressionist"
require "rails"

module Impressionist
  class Engine < Rails::Engine
   attr_accessor :orm

  def initialize
    define_orm_type(Impressionist.orm)
  end

  initializer 'impressionist.model' do |app|
    require_orm
    ActiveRecord::Base.send(:include, Impressionist::Impressionable)

  end


  initializer 'impressionist.controller' do
    require "impressionist/controllers/mongoid/impressionist_controller.rb" if orm == :mongoid.to_s

    ActiveSupport.on_load(:action_controller) do
     include ImpressionistController::InstanceMethods
     extend ImpressionistController::ClassMethods
   end
  end


 private<commit_msg>Removed conditional statements and following the DRY concept.<commit_after>require "impressionist"
require "rails"

module Impressionist
  class Engine < Rails::Engine
    attr_accessor :orm

  def initialize
    define_orm_type(Impressionist.orm)
  end

  initializer 'impressionist.model' do |app|
    require_orm
    ActiveRecord::Base.send(:include, Impressionist::Impressionable)

  end


  initializer 'impressionist.controller' do
    require "impressionist/controllers/mongoid/impressionist_controller.rb" if orm == :mongoid.to_s

    ActiveSupport.on_load(:action_controller) do
     include ImpressionistController::InstanceMethods
     extend ImpressionistController::ClassMethods
   end
  end


 private
{'fraction_non_alphanumeric': 0.07168718320057929, 'fraction_numerical': 0.0, 'mean_word_length': 4.956896551724138, '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': '7219561', 'n_tokens_mistral': 413, 'n_tokens_neox': 391, 'n_words': 86}