diff options
author | Matthew Draper <matthew@trebex.net> | 2017-11-17 19:33:29 +1030 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-17 19:33:29 +1030 |
commit | c39ed435eb578c79867552c66da7eeb035fa58ad (patch) | |
tree | 6d82f3f1e4ef09230808935559ec5d27701e449b | |
parent | 3bbc7f8f635b0d89e546c90d1b9db0683beece75 (diff) | |
parent | a41c55c0a36f3a0cedc2a72ae2b3d6a5a64d52ce (diff) | |
download | rails-c39ed435eb578c79867552c66da7eeb035fa58ad.tar.gz rails-c39ed435eb578c79867552c66da7eeb035fa58ad.tar.bz2 rails-c39ed435eb578c79867552c66da7eeb035fa58ad.zip |
Merge pull request #30100 from kirs/doc-reloader
Document public hooks in AS::Reloader
-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 6cd11b1a26..b26d9c3665 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 |