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.

<a href="https://web.archive.org/web/20130210090846/http://www.khelll.com/blog/ruby/ruby-callbacks/">This blog post</a> 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.