Closed ryanlecompte closed 12 years ago
Good idea, and I agree, these should be consistent. I'll patch it myself this weekend if someone else doesn't beat me to it. I hinted at why I use private accessors in a previous Practicing Ruby article, but I ran into some oddities with them in this particular use case. I'll mention those in Issue 3.4 if there aren't much more pressing issues to focus on.
Closed by 63a1ef
Currently private attr_accessors are not used for all classes. In some classes instance variables are referenced directly, and in other cases attr_accessor definitions are used.
In the next article, it would be interesting to discuss the benefits/advantages/reasoning behind defining private attr_accessor vs. direct instance variable access.