Active Support 重新加载器
此类定义了几个回调
to_prepare -- Run once at application startup, and also from
+to_run+.
to_run -- Run before a work run that is reloading. If
+reload_classes_only_on_change+ is true (the default), the class
unload will have already occurred.
to_complete -- Run after a work run that has reloaded. If
+reload_classes_only_on_change+ is false, the class unload will
have occurred after the work run, but before this callback.
before_class_unload -- Run immediately before the classes are
unloaded.
after_class_unload -- Run immediately after the classes are
unloaded.
方法
- A
- B
- N
- R
- T
- W
类公共方法
after_class_unload(*args, &block) 链接
注册一个回调,它将在类卸载后立即运行。
before_class_unload(*args, &block) 链接
注册一个回调,它将在类卸载前立即运行。
new() 链接
reload!() 链接
启动手动重新加载
to_prepare(*args, &block) 链接
注册一个回调,它将在应用程序启动时以及每次代码重新加载时运行一次。
wrap(**kwargs) 链接
运行提供的块作为工作单元,根据需要重新加载代码
实例公共方法
release_unload_lock!() 链接
如果之前已获得卸载锁,则释放它
require_unload_lock!() 链接
获取 ActiveSupport::Dependencies::Interlock
卸载锁,确保它将自动释放