From: Luke Kanies Date: 2007-01-17T13:21:44+09:00 Subject: Re: Solutions for deep class paths On Jan 17, 2007, at 2:39 PM, gwtmp01@mac.com wrote: > > Can you group all the constants in a module? Something like this: > > module Puppet > > module Constants > Constant1 = 42 > Constant2 = Constant1 * 42 > end > > module OSAL > module Type > end > end > > class OSAL::Type::User > include Constants # Now the constants can be used unqualified > > puts Constant1 > end > > class OSAL::Type::User2 > include Constants # Now the constants can be used unqualified > > puts Constant2 > end > end Well, the constants in this case are all of the class constants, not arbitrary constants like numbers. So, if I did this, I'd have to stick a constant for each class into that Constants module. -- Risk! Risk anything! Care no more for the opinions of others, for those voices. Do the hardest thing on earth for you. Act for yourself. Face the truth. -- Katherine Mansfield --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com