From: Julian Leviston Date: 2008-04-09T13:46:58+09:00 Subject: Re: Include module and class inheritance? which one to choose? A module is simply a place where you can store methods. Thus, you can include a module as a mixin in a class, and it will get all the methods. Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW! http://sensei.zenunit.com/ On 09/04/2008, at 1:51 PM, Shin guey Wong wrote: > What is the different between the including a module and inherit a > class? > > For me, there seems to be almost the same. The only thing is module > can > be think as an abstract class which is not instantiate able. > > If you include a module, you get all the methods from the module. You > can override the function and call super to call the method from the > module. This look the same as the class inherit. > > So, I am confusing on which one should I use? Create a module, include > it or create a class and inherit it? > > Thanks. > -- > Posted via http://www.ruby-forum.com/. >