From: Wilbert Berendsen Date: 2003-01-27T01:52:48+09:00 Subject: "exclude" (was: Re: cascading configuration variables) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 26 January 2003 17:32, ts wrote: > >>>>> "W" == Wilbert Berendsen writes: > > W> include Modulename > W> # now stuff like constants is available > W> exclude Modulename > W> # now not anymore. > > module A > A_nice_constant = 12 > end > module B > include A > end > module C > include A > end > > class D > include C > include B > exclude B # what module do you remove ? only B, or B and A ? > end well, I would think B and all ancestors of B. But the stuff from A would still be available, because it also got included in C. This way one could also do: module A CONSTANT="hi there" end module B include A end class C include B end C.class_eval "CONSTANT" >>> "hi there" B.module_eval "exclude A" C.class_eval "CONSTANT" >>> warning: Uninitialized constant But the problem is in fact, that I try to build something that is partially dynamic, but using constants. I now think I just should use hashes instead of a carefully constructed cascade of constants. all the best, Wilbert - -- Wilbert Berendsen (http://www.xs4all.nl/~wbsoft/) To understand recursion, one must first understand recursion. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+NBHux+vk367Vl7wRArkaAJ0acQgA8CAaSaFy8wkruVXycIs5SACfejf+ We0kvu1hvvGJVQP0277LW9o= =3Zwo -----END PGP SIGNATURE-----