Pierre Lebrun wrote:
> Also, why does ruby return an error for:
> Class Bob

keyword 'class' must be lowercase, not capitalized.

also, @count is an instance variable. In order to get a variable for 
which only one copy exists for the class, use @@count

class Bob
  @@count=0
  def initialize
    @@count+=1
  end
  def Bob.count
    @@count
  end
end

a = Bob.new
b = Bob.new
puts Bob.count
#=> 2
~Owein
-- 
Posted via http://www.ruby-forum.com/.