From: Phrogz Date: 2007-09-26T23:10:09+09:00 Subject: Re: difference between inheritance and mixin On Sep 26, 12:06 am, Vellingiri Arul wrote: > Hai friends, > Can anybody can answer this question. > what is the difference between inheritance and mixin. > what is the use of mixin and what is the use of inheritance. Mixin modules are searched before the parent class. http://phrogz.net/RubyLibs/RubyMethodLookupFlow.png Also, you can only inherit from one parent class, but you can mixin many modules to the same class. Because modules cannot inherit from other modules or classes, there is no problem of 'diamond' inheritance.