I'd suggest looking at the design docs for Omnibrowser
http://www.wiresong.ca/OmniBrowser/, a flexible object browser which uses
explicit meta-objects to configure things like what messages to send the
object being browsed. Class-based meta-objects could simply show all
instance variables; but other meta-objects could do fancier and more
selective browsing.

And if anyone wants to try a graphical view of an object graph (invaluable
at times) ruby-graphviz painlessly gives a png/gif drawing of an object
graph, even a clickable image-map for browsing.

Imho, either of these would be great. Some smart combination of the two
would be dynamite!

"Ruby Quiz" <james / grayproductions.net> wrote in message
news:20041119140626.XVOZ14730.lakermmtao03.cox.net / localhost.localdomain...
> The three rules of Ruby Quiz:
>
> 1.  Please do not post any solutions or spoiler discussion for this quiz
until
> 48 hours have passed from the time on this message.
>
> 2.  Support Ruby Quiz by submitting ideas as often as you can:
>
> http://www.grayproductions.net/ruby_quiz/
>
> 3.  Enjoy!
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=
>
> by Jim Menard
>
> Recently on ruby-talk, itsme123 asked if there was a generic object
browser that
> will "interactively browse a graph of connected objects by showing their
> instance variables and letting me click through to browse".
>
> The quiz challenge: write such a browser. It should be able to start at
any
> object or, if none is given to it, start at the main object ("self" at the
top
> level of any Ruby script).
>
> The interface to the browser can be text-based or graphical.
>
> I'm thinking of something like the Squeak Explorer (the new inspector).
It's a
> window that displays the object with an open/close triangle next to it.
Click
> the triangle, and the ivars are exposed.
>
> V  root: an OrderedCollection(a MyClass, a Number)
>    V 1: a MyClass
>     > name: 'the name'
>     > anotherIvar: 42
>    > 2: a Number
>
> That's just one possible UI, of course.
>
> Bonus points for allowing modification of instance variable values and for
> allowing inspection of classes (remember, classes are objects, too!).
>
>