From: Satsou Sa Date: 2010-12-31T01:41:35+09:00 Subject: Re: How to hook a callback through inheritance Thanks to **Mon_Ouie**, the solution is: class Lmao def initialize @str = "HAHAHAHAHAHHAHAHAH" end def self.inherited(base) base.extend(Callbacks) end def laughing self.class.callbacks_before_laughing.each {|method| send(method) } @str end end module Callbacks def before_laughing(*methods) @before_laughing = methods end def callbacks_before_laughing @before_laughing end end class Lol < Lmao before_laughing :downcase_please def downcase_please @str.downcase! end end Pretty awesome. -- Posted via http://www.ruby-forum.com/.