module Hooks
def self.included(base)
def self.included(base) base.extend InheritableAttribute base.extend ClassMethods end
def run_hook(name, *args)
desert("i want ice cream!")
will invoke the callbacks like
cat.run_hook :after_dinner, "i want ice cream!"
Example:
be passed to the callback.
Runs the callbacks (method/block) for the specified hook +name+. Additional arguments will
def run_hook(name, *args) self.class.run_hook_for(name, self, *args) end