From: Its Me Date: 2004-02-27T02:54:48+09:00 Subject: Extensible meta-data ? I need to easily attach various kinds of meta-data to modules, classes, methods, constants, instance variables, etc. I would like to be able to write things that are, broadly, like this: class C def M ... end meta { keyA => objA, keyB => objB } ... end meta { key1 => obj1, key2 => obj2 } I will typically use this to distinguish different kinds of classes, methods, etc in my own ontology, to do some Ruby code generation into the corresponding class, method, etc, and to reverse that code generation if needed when the meta-data is changed. This is also the reason I eas expecting that class ...end would return the class, def ... end should return the unbound method (or something close to these) in a uniform POLS manner. This kind of need has probably arisen before. Is there some recommended way, idiom, or (ideally) code to do this? Will Ruby 2.0 have any direct support for such extensible meta-data? Thanks ...