module Ramaze::Reloader::Hooks
Holds hooks that are called before and after cycle and safe_load
Public Instance Methods
after_cycle()
click to toggle source
Overwrite to add actions after the reload rotation has ended.
# File lib/ramaze/reloader.rb, line 184 def after_cycle; end
after_safe_load(file)
click to toggle source
Overwrite to add custom hook in addition to default Cache cleaning
# File lib/ramaze/reloader.rb, line 200 def after_safe_load(file) end
after_safe_load_failed(file, error)
click to toggle source
Overwrite to add actions after a file is Kernel::load-ed unsuccessfully, by default we output an error-message with the exception.
# File lib/ramaze/reloader.rb, line 205 def after_safe_load_failed(file, error) Log.error(error) end
after_safe_load_succeed(file)
click to toggle source
Overwrite to add actions after a file is Kernel::load-ed successfully, by default we clean the Cache for compiled templates and resolved actions.
# File lib/ramaze/reloader.rb, line 194 def after_safe_load_succeed(file) Cache.clear_after_reload after_safe_load(file) end
before_cycle()
click to toggle source
Overwrite to add actions before the reload rotation is started.
# File lib/ramaze/reloader.rb, line 181 def before_cycle; end
before_safe_load(file)
click to toggle source
Overwrite to add actions before a file is Kernel::load-ed
# File lib/ramaze/reloader.rb, line 187 def before_safe_load(file) Log.debug("reload #{file}") end