Forum: Ruby Rdoc inside method or function definition

Posted by 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
Posted by 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 (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.