method
clear
v4.1.8 -
Show latest stable
- Class:
ActiveSupport::DescendantsTracker
clear()public
No documentation available.
# File activesupport/lib/active_support/descendants_tracker.rb, line 18
def clear
if defined? ActiveSupport::Dependencies
@@direct_descendants.each do |klass, descendants|
if ActiveSupport::Dependencies.autoloaded?(klass)
@@direct_descendants.delete(klass)
else
descendants.reject! { |v| ActiveSupport::Dependencies.autoloaded?(v) }
end
end
else
@@direct_descendants.clear
end
end