You might want to consider it a reasonable thing to wrap the snippet below into the File class, so:
class File [the snippet] end and put it into a utility module such that you can require and use it generally. ---Michael B. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris McMahon Sent: March 9, 2006 3:05 PM To: [email protected] Subject: Re: [Wtr-general] how to handle latency On 3/9/06, Roy Sin <[EMAIL PROTECTED]> wrote: > Any idea on how to make the script wait until the report is > generated and validated before proceeding to the next def. def sleep_for_file Find.find("C:/ReportDir") do |f| if f =~ /txt/ #DO STUFF break else sleep 2 end #if end #do end #def _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
