From: Phrogz Date: 2007-12-14T09:49:59+09:00 Subject: Re: Enforce implementation of Module method On Dec 13, 3:38 pm, Paul wrote: > Let's say I have the following module: > > ------------------------ > module Parenting > > def add_child(a_child) > self.children.push(a_child) > end > > def delete_child(a_child) > self.children.delete(a_child) > end > > def children > # need to implement > end > > end > ------------------------ > > Is there a way to enforce that the 'children' method is implemented in > any class which includes this module? Or do I simply rely on a > commenting convention, as above? module Parenting def children raise "OOPS!" #Better error message here end end If a class defines that method, it will shadow the module method. As long as the class method doesn't try to call super, you should be good to go.