Correct documentation for protected methods [ci skip]

This commit is contained in:
John Hawthorn 2022-03-11 19:21:50 -08:00
Родитель b180ffa622
Коммит 962a3247b1
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -155,8 +155,8 @@ Ruby has three types of visibility. The default is +public+. A public method
may be called from any other object.
The second visibility is +protected+. When calling a protected method the
sender must be a subclass of the receiver or the receiver must be a subclass of
the sender. Otherwise a NoMethodError will be raised.
receiver must inherit the Class or Module which defines the method. Otherwise a
NoMethodError will be raised.
Protected visibility is most frequently used to define <code>==</code> and
other comparison methods where the author does not wish to expose an object's