0
Count and instances
In Ruby, can anyone recommend a better way to count instances and track details of all instances? What I typically do is define class variables @@count = 0 and @@instances = [] and use @@count += 1 and @@instances << self under initialize. Thanks!
0 ответов