From: Robert Klemme Date: 2005-11-03T21:52:12+09:00 Subject: Re: include Christophe Grandsire wrote: > Selon Alexander Fleck : > >> Hi, >> is the Ruby-'include' equal to a C++-'using' statement? Meant for >> namespace issues. Or does it have a bigger result? >> Thanks, >> Alex. >> > > "include" is used to mix in a module into a class. It has nothing to > do with namespaces, but is rather a way to quickly add functionality > to a class beyond what is given by its superclass without resorting > to multiple inheritance= Adding to that "extend" is more similar to "using". Using "extend" you can make some things (i.e. methods) from a module directly available. Kind regards robert