mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add alias treatment to method_documentation.rdoc (#3468)
* Add alias treatment to method_documentation.rdoc
This commit is contained in:
parent
3ffef9a032
commit
4a5dd970a7
Notes:
git
2020-08-29 03:39:47 +09:00
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,7 @@ The general structure of the method documentation should be:
|
||||||
* Details and Examples
|
* Details and Examples
|
||||||
* Argument Description (if necessary)
|
* Argument Description (if necessary)
|
||||||
* Corner Cases and Exceptions
|
* Corner Cases and Exceptions
|
||||||
|
* Aliases
|
||||||
* Related Methods (optional)
|
* Related Methods (optional)
|
||||||
|
|
||||||
== call-seq (for methods written in C)
|
== call-seq (for methods written in C)
|
||||||
|
@ -62,6 +63,8 @@ Instead of:
|
||||||
However, as shown above for <tt>Array#count</tt>, use separate lines if the
|
However, as shown above for <tt>Array#count</tt>, use separate lines if the
|
||||||
behavior is different if the argument is omitted.
|
behavior is different if the argument is omitted.
|
||||||
|
|
||||||
|
Omit aliases from the call-seq.
|
||||||
|
|
||||||
== Synopsis
|
== Synopsis
|
||||||
|
|
||||||
The synopsis comes next, and is a short description of what the
|
The synopsis comes next, and is a short description of what the
|
||||||
|
@ -131,6 +134,10 @@ you do not need to document that a TypeError is raised if a non-integer
|
||||||
is passed. Do not provide examples of exceptions being raised unless
|
is passed. Do not provide examples of exceptions being raised unless
|
||||||
that is a common case, such as Hash#fetch raising KeyError.
|
that is a common case, such as Hash#fetch raising KeyError.
|
||||||
|
|
||||||
|
== Aliases
|
||||||
|
|
||||||
|
Mention aliases in the form "Array#find_index is an alias for Array#index."
|
||||||
|
|
||||||
== Related Methods (optional)
|
== Related Methods (optional)
|
||||||
|
|
||||||
In some cases, it is useful to document which methods are related to
|
In some cases, it is useful to document which methods are related to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue