On Sat, Jan 10, 2009 at 11:09 AM, Robert Klemme
<shortcutter / googlemail.com> wrote:
>>> 2.) help(obj) -> <no brainer>
>>
>> Doesn't exist.  Ruby does not have documentation metadata attached to
>> objects.

But it doesn't change situation for core/stdlib classes. Python's
__doc__ is very useful, specially when someone is learning language
and playing with it interactive shell. For Ruby I have defined method
'ri' in my ~/.irbrc file:

    def ri(*names)
      system("ri %s" % names.map(&:to_s).join(" "))
    end

so I can type in irb: ri 'Array#zip' and rdoc documentation is
displayed. IMHO __doc__ is better because for nested calls
(obj.method1().method2().attribute) in ruby you should first know what
class you have (ok you don't but type 'ri zip' and you get 20
different choices).

-- 
Pozdrawiam

Radosw Bu„Šat
http://radarek.jogger.pl - m blog