From: Lyle Johnson Date: 2002-12-20T05:37:23+09:00 Subject: Re: determing defined constants for a class Robert McGovern wrote: > From looking at the docs I can see that it is possible to determine > which Constants have been declared for a particular module, but I cannot > see a means of finding out what constants have been declared in a > particular class. > > This leads to ask, if there a method that I can't see for determining > declared constants in a class? A class is-a module (i.e. the "Class" class is derived from the "Module" class). So to determine the constants for a class just call Class#constants. > ... and secondly, is it considered bad practice to put constants > in a class rather than a module? No.