Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browsing Ruby code a la Smalltalk?

Tags:

ruby

What's the closest equivalent of the Smalltalk Class Hierarchy Browser? I've seen some workarounds like this, but it seems not scriptable.

Smalltalk Class Hierarchy Browser

like image 978
user1000565 Avatar asked Aug 10 '12 01:08

user1000565


1 Answers

There really isn't one, at least not with a Smalltalk-like UI including static and dynamic behaviors.

Eclipse and IntelliJ both have some structural insight. Eclipse has a view sort-of similar to a browser. The biggest issue with either is that unless you're working on live objects (e.g., debugging) you won't necessarily know all of an object's behavior since some is defined at runtime. A static view without an image or partial runtime cannot give a complete picture.

IntelliJ does a decent job of figuring things out. For example, a class with an attr_accessor :foo will show the @foo instance variable in the structure pane. I'm not sure you can configure the UI around to be more browser-like, though; Eclipse is better in this regard–each "level" can be added separately.

(Since 1994-95ish I've felt we kept taking steps backwards, it's only recently that IDEs have gotten smart enough to give me back some of the productivity I had with Smalltalk/Lisp. Smalltalk's image-based runtime confers a lot of advantages in this regard.)

like image 199
Dave Newton Avatar answered Sep 29 '22 23:09

Dave Newton