[Uw-ruby] Where do you start for week 6's homework?
Garrick West
garrick at acm.org
Mon Nov 12 23:57:57 PST 2007
Hi Feng,
From the example parameters, I believe we only have to deal with
the options, the text or regexp to search for, and an arbitrary list
of files or URLs. The first part can be done with OptionsParser
(RubyDoc has a good example at
http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html).
You can TDD one value at a time with defaults in your initialize
setting everything to false. I'm still figuring out how to grab off
the actual arguments as opposed to the options. It seems like just
indexing into the supply array would do it (here comes the Test
coverage again, of course)..
--Garrick
On 11/11/07, Feng Tien <feng.tien at gmail.com> wrote:
> I'm just totally lost, did I miss something when I left right after the
> lecture?
>
> Are you suppose to use find.rb to do this?
>
> Is this the format you're suppose to have?
>
> pgrep -i error /var/log/system.log http://www.example.com/status.txt
>
> or would it be something like: pgrep(error,-I, /var/log/system.log,
> http://www.example.com/status.txt) to run it?
>
>
> _______________________________________________
> Uw-ruby mailing list
> Uw-ruby at zenspider.com
> http://www.zenspider.com/mailman/listinfo/uw-ruby
>
More information about the Uw-ruby
mailing list