Method: ActiveSupport::Dependencies::ZeitwerkIntegration::Decorations#autoloaded?

Defined in:
lib/active_support/dependencies/zeitwerk_integration.rb

#autoloaded?(object) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/active_support/dependencies/zeitwerk_integration.rb', line 30

def autoloaded?(object)
  cpath = object.is_a?(Module) ? real_mod_name(object) : object.to_s
  Rails.autoloaders.main.unloadable_cpath?(cpath)
end