From: Avdi Grimm Date: 2009-01-10T12:14:26+09:00 Subject: Re: Ruby introspection???? On Fri, Jan 9, 2009 at 9:49 PM, r wrote: > 1.) dir(obj) -> obj.instance_methods > 2.) help(obj) -> Doesn't exist. Ruby does not have documentation metadata attached to objects. > 3.) print obj.__doc__ --> See above. > 4.) type(obj) obj.class > 5.) id(obj) obj.id You may notice a trend here - where in Python you sometimes use method(obj) and sometimes obj.method() to find out about an object, in Ruby it's *always* obj.method(). > > any other helpful methods?? http://ruby-doc.org/ -- Avdi Home: http://avdi.org Developer Blog: http://avdi.org/devblog/ Twitter: http://twitter.com/avdi Journal: http://avdi.livejournal.com