123456789_123456789_123456789_123456789_123456789_

Class: Rails::ZeitwerkChecker

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: railties/lib/rails/zeitwerk_checker.rb

Overview

The actual (private) implementation of the Rake task zeitwerk:check.

Class Method Summary

Class Method Details

.check

[ GitHub ]

  
# File 'railties/lib/rails/zeitwerk_checker.rb', line 5

def self.check
  Zeitwerk::Loader.eager_load_all

  autoloaded = ActiveSupport::Dependencies.autoload_paths + ActiveSupport::Dependencies.autoload_once_paths
  eager_loaded = ActiveSupport::Dependencies._eager_load_paths.to_a

  unchecked = autoloaded - eager_loaded
  unchecked.select! { |dir| Dir.exist?(dir) && !Dir.empty?(dir)  }
  unchecked
end