Real modules for Ruby ― Thoughtfolder

screenshot

More specifically, it doesn’t have real mixins (or interfaces or typeclasses if you like). But then what does a module mixin do? It modifies a class’s inheritance chain at runtime class A; end class B < A; end B.ancestors # => [B, A, Object, Kernel] module M; end class B; include M end B.ancestors # => [B, M, A, Object, Kernel] So to set things straight in your head, just remember that a module is a class can only be instantiated as a superclass of a class that includes the module. incl...

http://blog.thoughtfolder.com/2008-03-11-real-modules-for-ruby.html
http://b.hatena.ne.jp/entry/http://blog.thoughtfolder.com/2008-03-11-real-modules-for-ruby.html