elm-city-craftworks / turing_tarpit

12 stars 6 forks source link

Inconsistent use of private attr_acessor vs. direct ivar access #1

Closed ryanlecompte closed 12 years ago

ryanlecompte commented 12 years ago

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.

practicingruby commented 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.

practicingruby commented 12 years ago

Closed by 63a1ef