diff options
author | Kir Shatrov <shatrov@me.com> | 2017-08-06 21:40:55 +0300 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-08-14 21:18:33 +0300 |
commit | a41c55c0a36f3a0cedc2a72ae2b3d6a5a64d52ce (patch) | |
tree | 24bbd15a72554769e10ad224b717b1f5e5dfe6c6 /activesupport/lib | |
parent | 904f1a8747958129124d86b44e36c5f0263e0125 (diff) | |
download | rails-a41c55c0a36f3a0cedc2a72ae2b3d6a5a64d52ce.tar.gz rails-a41c55c0a36f3a0cedc2a72ae2b3d6a5a64d52ce.tar.bz2 rails-a41c55c0a36f3a0cedc2a72ae2b3d6a5a64d52ce.zip |
Document public hooks in AS::Reloader [ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/reloader.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/reloader.rb b/activesupport/lib/active_support/reloader.rb index 44062e3491..1e3141dc2a 100644 --- a/activesupport/lib/active_support/reloader.rb +++ b/activesupport/lib/active_support/reloader.rb @@ -28,14 +28,17 @@ module ActiveSupport define_callbacks :class_unload + # Registers a callback that will run once at application startup and every time the code is reloaded. def self.to_prepare(*args, &block) set_callback(:prepare, *args, &block) end + # Registers a callback that will run immediately before the classes are unloaded. def self.before_class_unload(*args, &block) set_callback(:class_unload, *args, &block) end + # Registers a callback that will run immediately after the classes are unloaded. def self.after_class_unload(*args, &block) set_callback(:class_unload, :after, *args, &block) end |