From: Ruby Rabbit Date: 2009-01-14T04:08:05+09:00 Subject: Implementing each and <=> I have a data model and would like to let it be Enumerable. I want to confirm if this is the way of implementing each and <=> : def each @list.each { |item| yield item } end def <=>(other) @list <=> other end (let's just assume that @list is an array) Thanks. -- Posted via http://www.ruby-forum.com/.