Merge pull request #30100 from kirs/doc-reloader

Document public hooks in AS::Reloader
This commit is contained in:
Matthew Draper 2017-11-17 19:33:29 +10:30 committed by GitHub
commit c39ed435eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,14 +28,17 @@ class Reloader < ExecutionWrapper
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