From: Max Williams Date: 2009-01-06T20:17:53+09:00 Subject: Re: Order notes starting at C thru B rather than A thru G Brian Candler wrote: > > Define a <=> operator in your class. > > class Note > include Comparable > def <=>(other) > name <=> other.name # modify this to give your desired ordering > end > end > > 'include Comparable' also gives you <, >, <= and >= operators based on > <=> thanks! -- Posted via http://www.ruby-forum.com/.