> > I've been wanting to abstract out the metadata definition into a generic > > mechanism for defining metadata on any attribute, but if this were added to > > traits that would pretty much be it. Thoughts? > > you would want something like > > class Foo > trait 'a', 'description' => 'metadata', 'fu' => 'bar' > end > > p Foo::trait_opts('a') > > that'd be possible. or did you mean something else? Exactly :) Then something like Foo::trait_opts.each { |trait,opts| } could be used to loop through the ordered list of traits. - Kevin