Forum: Ruby description, what is it?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zhenning G. (Guest)
on 2008-10-12 19:12
I read a class like this.what's the description work for?


class Employee
 description "xxxxxxxx"
 #some code continue here
end
Sebastian H. (Guest)
on 2008-10-12 21:45
(Received via mailing list)
Zhenning G. wrote:
> I read a class like this.what's the description work for?
>
>
> class Employee
>  description "xxxxxxxx"
>  #some code continue here
> end

Well, it's not part of ruby core/stdlib, but it seems to be an instance
method
of Module or Class (or maybe Object) that, judging by its name, stores
the
description of a class/module (or maybe object) and presumably allows
you to
acces this description from a documentationt or source code browser of
some
sort - or something like that.

HTH,
Sebastian
Hassan S. (Guest)
on 2008-10-12 22:04
(Received via mailing list)
On Sun, Oct 12, 2008 at 10:40 AM, Sebastian H.
<removed_email_address@domain.invalid> wrote:
> Zhenning G. wrote:
>> I read a class like this.what's the description work for?

> Well, it's not part of ruby core/stdlib

erm, uh, at <http://www.ruby-doc.org/core/> I find "description" listed
as a method of Generators::HtmlMethod  :-)
Sebastian H. (Guest)
on 2008-10-12 22:12
(Received via mailing list)
Hassan S. wrote:
> > Well, it's not part of ruby core/stdlib
>
> erm, uh, at <http://www.ruby-doc.org/core/> I find "description" listed
> as a method of Generators::HtmlMethod  :-)

Yeah, but that's not the one used in his code snippet.
This topic is locked and can not be replied to.