1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] Add note about method names (#6620)

This commit is contained in:
Burdette Lamar 2022-10-24 08:56:13 -05:00 committed by GitHub
parent 5a86155249
commit bcb72f503c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-10-24 13:56:33 +00:00
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>

View file

@ -137,6 +137,19 @@ or [list](rdoc-ref:RDoc::Markup@Simple+Lists)
should be preceded by and followed by a blank line.
This is unnecessary for the HTML output, but helps in the `ri` output.
### \Method Names
For a method name in text:
- For a method in the current class or module,
use a double-colon for a singleton method,
or a hash mark for an instance method:
<tt>::bar</tt>, <tt>#baz</tt>.
- Otherwise, include the class or module name
and use a dot for a singleton method,
or a hash mark for an instance method:
<tt>Foo.bar</tt>, <tt>Foo#baz</tt>.
### Auto-Linking
In general, \RDoc's auto-linking should not be suppressed.