From: Sam Kong Date: 2005-12-14T02:12:39+09:00 Subject: Private attribute or accessor? Hi! See the following codes. [1] class C attr_accessor :a def f(v) @a = v ... end end [2] class C attr_accessor :a def f(v) a = v ... end end [1] and [2] work exactly same. I wonder which way is more proper. In my opinion, if there're accessors (getter and setter), using them in the class is better than directly accessing the instance data. However, most codes I've seen access the data directly. What do you think? Sam