When to use `self.foo` instead of `foo` in Ruby methods
It is idiomatic to prefer to omit self. when invoking methods; it is generally never needed. You must use self.foo = xxx when calling a setter method, instead of foo = xxx, so that Ruby realizes that you are not trying create a new local variable. Similarly, in the unlikely event that you have an … Read more