From: Marnen Laibow-Koser Date: 2009-11-14T13:43:25+09:00 Subject: Re: Naming conventions -- was: Re: DRYing a Regex David Turnbull wrote: > On 14/11/2009, at 15:21, James Edward Gray II > wrote: >> class, which is what people traditionally take for the type, is just >> one piece of an object's identity. > > I would still look immediately to the class of the object in order to > find out what it's supposed to do. I would too. James is correct that it isn't the whole story, but it's the best place to start. > From there, the class definition > will probably list it's module inclusions prominently. > > As a vim user, with very limited interactive debugging, What? You can use ruby-debug interactively in a console session. I often do. > my primary > exploration technique will usually consist of at most a couple of > 'obj.methods.grep' calls followed by grepping ~/gems which seems to > emphasize the actual reading of the source for object identity info. > > Python's integrated documentation would be really welcome in this > case, i think. :) WTF? Aren't you familiar with RDoc? And didn't you know that running "gem server" will start a Web server with gem RDoc pages on port 8808? > > I'm curious what you think the most correct way is to discover object > identity. Object identity? Well, for that, you need object_id. That's something different than object type. -- Posted via http://www.ruby-forum.com/.