From: Michael Saltzman Date: 2006-08-02T00:43:12+09:00 Subject: Enumerable Am new to Ruby and have the folloiwng Question. I have a class, say Collect, and I want to mixin Enumerable. How do I write the each method in Collect? class Collect include Enumerable def initialize() @array = Array.new(0) @ct = 0 end def add(item) @array.push(item) @ct += 1 end def howmany @ct end def each # # Not sure how to do this???? # end end -- Posted via http://www.ruby-forum.com/.