Forum: Ruby Rdoc inside method or function definition

C94afbb820c49a847b3b1f5244178f82?d=identicon&s=25 Eduardo Blumenfeld (eblumenfeld)
on 2012-12-20 17:31
Hi All,

Could it be possible to have documentation comments for the rdoc inside
a method definition as:

Traditional:
--------------------
# comment 1
# comment 2
def foo(*args)
   ...
end
--------------------

what I would like:
--------------------
def foo(*args)
   # comment 1
   # comment 2
   ...
end
--------------------

And still appear in the rdoc document?

Is this a silly question?

Regards,

Eduardo
5b972395a92333843018b4add8af0437?d=identicon&s=25 Damián M. González (igorjorobus)
on 2012-12-20 23:19
You can't. But when the method is documented you can show the source
code(in the .html generated), and there you can see the comments inside
the method definition.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.