From: Aldric Giacomoni Date: 2009-12-17T00:49:35+09:00 Subject: Re: Using threads to show progress Brian Candler wrote: > # A suggestion > > class Progress > def initialize(out = STDERR, interval = 0.5) > @out = out > @interval = interval > @timestamp = nil > @category = nil > end > > [...] > > def self.<<(data) > @progress ||= new > @progress << data > end > end That's pretty interesting. Are you.. Defining an instance of the class within the class itself ? Why are you using STDERR? Thanks for the suggestion; I'll pore over that. -- Posted via http://www.ruby-forum.com/.