From: "Charles E. Thornton" Date: 2005-09-28T01:34:42+09:00 Subject: Re: Wilderness: How to convert from Klass/Super References to Name Ryan Davis wrote: > > On Sep 25, 2005, at 6:31 PM, Charles E. Thornton wrote: > >> I am trying to write a object mapping routine (to feed DOT/Graphiz) >> and I >> need to convert from a Object Reference to a Name (rb_(ref)2name. I do >> not see a direct way to do this --- > > > Any name, like, for dot node names?? You could just name everything > "obj_#{object_id}" and that should let everything resolve rather well. > > > > > I can do that and then hand edit names to make it more readable. However, what I would like to do is the following. NOTE: As I am new to ruby, what I am attempting to do MAY BE Wrong Headed: I see Three Parts in Object Space: 1) The rb_cObject -- rb_cModule -- rb_cClass Nucleus 2) The Predefined Classes 3) User Objects (Both Explicit and Requires) What I propose is that only 3) be mapped and explicit symbols showing where objects connect to 1) and 2) Processing Envisioned: 1) Label each 3) Object with the object's 'Name' 2) Label any subordinate classes (metaclasses...) of a 'Named' Object 'Name'.MetaClass' 3) Process constructed DOT List with Graphiz Now: A) As I try to understand Ruby Core - I would get a lot of information by seeing what is created in Object Space. B) What am I overlooking (Probably a lot ;-) ) -- GodFather -- 667 Neighbor of the Beast