ruby-changes:73024
From: Burdette <ko1@a...>
Date: Tue, 23 Aug 2022 03:17:25 +0900 (JST)
Subject: [ruby-changes:73024] aeac8b6c3a (master): [DOC] Addition to section 'Related Methods' (#6271)
https://git.ruby-lang.org/ruby.git/commit/?id=aeac8b6c3a From aeac8b6c3a48279ffe138f3be6ae62208f43f5b3 Mon Sep 17 00:00:00 2001 From: Burdette Lamar <BurdetteLamar@Y...> Date: Mon, 22 Aug 2022 13:17:05 -0500 Subject: [DOC] Addition to section 'Related Methods' (#6271) Addition to section 'Related Methods': suggests adding differentiators to the names of related methods. --- doc/contributing/documentation_guide.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/doc/contributing/documentation_guide.md b/doc/contributing/documentation_guide.md index f011841809..df67747710 100644 --- a/doc/contributing/documentation_guide.md +++ b/doc/contributing/documentation_guide.md @@ -376,12 +376,22 @@ Mention aliases in the form https://github.com/ruby/ruby/blob/trunk/doc/contributing/documentation_guide.md#L376 In some cases, it is useful to document which methods are related to the current method. For example, documentation for `Hash#[]` might mention `Hash#fetch` as a related method, and `Hash#merge` might mention -`Hash#merge!` as a related method. Consider which methods may be related -to the current method, and if you think the reader would benefit it, -at the end of the method documentation, add a line starting with -"Related: " (e.g. "Related: #fetch"). Don't list more than three -related methods. If you think more than three methods are related, -pick the three you think are most important and list those three. +`Hash#merge!` as a related method. + +- Consider which methods may be related + to the current method, and if you think the reader would benefit it, + at the end of the method documentation, add a line starting with + "Related: " (e.g. "Related: #fetch."). +- Don't list more than three related methods. + If you think more than three methods are related, + list the three you think are most important. +- Consider adding: + + - A phrase suggesting how the related method is similar to, + or different from,the current method. + See an example at Time#getutc. + - Example code that illustrates the similarities and differences. + See examples at Time#ctime, Time#inspect, Time#to_s. ### Methods Accepting Multiple Argument Types -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/