|
|
|
|
|
by danso
5192 days ago
|
|
>> Using a method that is called on self in a class, don’t use self.method_name when just plain method_name will do. (loc. 1500) I don't have the book in front of me so I don't know what the context is, but this strikes me as something as barely worth highlighting, other than to show that you grok Ruby's method chain. Some programmers would argue that using self.method_name helps clear up ambiguity to humans who read the code, even if it is equivalent to method_name |
|
I think there's no good rule of thumb to be had here; use whichever style makes the code clearer.