From: Ken Bloom Date: 2007-08-19T12:39:57+09:00 Subject: Re: Ruby's equivalent to Java's "interface" On Sun, 19 Aug 2007 11:17:07 +0900, Olivier Renaud wrote: > Note that the method 'quack' from class 'Squeek' replaces the definition > of the method 'quack' that was first included from 'QuakeBehavior'. If > you use this technique, you will be warned by a NotImplementedError (so, > at runtime), if you forgot to define a method in classes that include > QuakeBehavior. I don't think it is a good design, but maybe it can help. You get two differences when you do this: one is that NotImplementedError rather than a NameError -- that's probably not too important. The other is that you can use is_a? and case statements to match QuakeBehavior. --Ken -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/