# frozen_string_literal: true

# Rails Enhancements
if defined? Rails
  require "sorter/identity"
  require "sorter/engine"
  require "sorter/active_record/class_methods"
  require "sorter/active_record/instance_methods"
  require "sorter/action_view/instance_methods"
  require "sorter/action_controller/class_methods"
  require "sorter/action_controller/instance_methods"

  ActiveRecord::Base.public_send :include, Sorter::ActiveRecord
  ActionView::Base.public_send :include, Sorter::ActionView
  ActionController::Base.public_send :include, Sorter::ActionController
else
  warn "#{Sorter::Identity.label} currently supports Ruby on Rails only."
end
