From: Axel Etzold Date: 2008-11-07T03:56:02+09:00 Subject: Re: Data output -------- Original-Nachricht -------- > Datum: Fri, 7 Nov 2008 02:23:40 +0900 > Von: Stuart Clarke > An: ruby-talk@ruby-lang.org > Betreff: Data output > I am processing data from an array which basically involves me searching > for specific information and outputting the results that match eg. > > ....... > if data == 100 > puts "#{data.time_written}" > > I have just inserted a step which adds some additional criteria. This > states if you find data that equals 100 does it happens more than 10 > times in one day. > > This all works fine. What i want is some kind of nested if statement > thats does the following: > > if data == 100 > if data happens more than 5 times in one day > print out the results of all the data that equals 100 but highlight > (colour code, italics etc)the data within the results that happens more > than 5 times in a day. > > An example of the results might be > > 100 monday - - - BOLD > 100 monday - - - BOLD > 100 monday - - - BOLD > 100 monday - - - BOLD > 100 monday - - - BOLD > 100 monday - - - BOLD > 100 tuesday - - - NORMAL > > Hope this makes sense. > > Regards > -- > Posted via http://www.ruby-forum.com/. Dear Stuart, you can output your report as a html document using textile: http://whytheluckystiff.net/ruby/redcloth/ using very simple markup styles. Best regards, Axel -- "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail