how to write acts_as style model extensions?

Hi, I want to have a go at writing an extension to my models, in a
similar style to those acts_as model extensions. I want to have a sigle
declaration that includes my functionality, similar to
"acts_as_taggable" and then specify callbacks in a similar way to
"before_filter" that my extended functionality will call. Something

Class Item < ActiveRecord
  widget_work_filter :do_widget_work

  def do_widget_work


Is there a good resource you can point me at that will explain how to do