Class: Rails::ZeitwerkChecker
- Inherits:
-
Object
- Object
- Rails::ZeitwerkChecker
- Defined in:
- lib/rails/zeitwerk_checker.rb
Overview
The actual (private) implementation of the Rake task zeitwerk:check.
Class Method Summary collapse
-
.check ⇒ Object
:nodoc:.
Class Method Details
.check ⇒ Object
:nodoc:
5 6 7 8 9 10 11 12 13 14 |
# File '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 |