Hey Dan.

On Wed, May 31, 2006 at 03:16:45AM +0900, Berger, Daniel wrote:
> How do I grab a particular file and load it into memory or onto the
> local filesystem?  I tried using the 'text' method (based on the
> examples file) but that didn't seem to work for me.
> 

I misread the question the first time, so I'll try again!  The text
method helps you match the text displayed.  For example, a url that
looks like this:

Hello World!

Would be found like this:

  page.links.text('Hello World!').first

Mechanize returns an array because there could be multiple links that
have that text.  You can also use a regular expression like this:

  page.links.text(/Hello World!/).first

Or, say you need to find all files whose 'href' ends in '.csv', you
could do this:

  page.links.href(/\.csv$/).each { |link|
    puts agent.click(link).body
  }

Hope this helps!

--Aaron