class Sorbet::Private::RequireEverything
def self.excluded_rails_files
def self.excluded_rails_files excluded_paths = Set.new # Exclude files that have already been loaded by rails rails = Object.const_get(:Rails) load_paths = rails.application.send(:_all_load_paths) load_paths.each do |path| excluded_paths += Dir.glob("#{path}/**/*.rb") end # Exclude initializers, as they have already been run by rails and # can contain side-effects like monkey-patching that should # only be run once. excluded_paths += Dir.glob("#{Dir.pwd}/config/initializers/**/*.rb") end