From: Pierre Lebrun Date: 2008-10-17T12:36:33+09:00 Subject: instance counter Please forgive the trite nature of this question, I'm new to ruby and OO programming in general. I'm looking to create a counter that keeps track of the number of instances created from one class (++ would we access this from the class or the instace?). I've made a few lame attempts myself so far but nothing functional :-P Also, why does ruby return an error for: Class Bob attr_reader :count @count = 0 def initialize @count += 1 end end Cheers! -- Posted via http://www.ruby-forum.com/.