From: Ralph Mason Date: 2004-01-20T13:36:26+09:00 Subject: Re: Metadata Ryan Pavlik wrote: >On Tue, 20 Jan 2004 13:05:51 +0900 >Ralph Mason wrote: > > > >>I am playing with dynamicaly creating proxy ruby objects, but need >>more data than can be provided by a class or function name. >> >>And so am wondering if anyone has a way to do this? >> >> > >Everyone will hate me for this, but I wrote two modules for doing just >these two things: MetaTags and Strongtyping. Unfortunately the server >has been down this weekend due to hardware death. I've just reloaded >the mephle.org stuff, so those should be there now. > >You may or may not care for how metatags works; it works conveniently >for me, but you could build a compatible structure from various means. >If you come up with another interesting way of doing this, I would be >interested. > > I will check out your stuff. Thanks I guess I would just like to be able to do something like my example. Also being to subclass Metadata would be handy eg class PlRubyFunction < Metadata def initialize(ret,params) .... end end ...sometime later def MyClass PlRubyFunction.new("int",["int","int"]) def my_func(x) end end .... Metadata.each(PlRubyFunction){| func| puts func.class puts func.name puts func.ret puts func.params #I would really like this one puts func.code } Or somesuch like that so you can make metadata self vaidating. It seems like something that would have an unlimited number of useful and creative applications. Ralph