Hooks are a fascinating bit of Ruby magic. They are methods you can define with actions to run when something happens. You can put triggers in your code.
This blog post explains them very well; and for more information, get "Metaprogramming Ruby", which is a great book - not only about the callbacks, but about a host of information.
Author Aldric Giacomoni