From: Matt Mencel Date: 2012-05-17T06:16:06+09:00 Subject: How to Iterate Through a Class How do I iterate through a Class so that I can perform some action on each object? For example... MyClass.each do {|obj| DO SOME STUFF} It looks like I have to create the .each method in my class. I tried something like what's mentioned here... http://stackoverflow.com/questions/2080007/how-do-i-add-each-method-to-ruby-object-or-should-i-extend-array ...but haven't gotten it to work. Matt