Class RFuzz::Browser
In: lib/rfuzz/browser.rb
Parent: Object

A simple class that emulates a browser using hpricot.

Methods

links   new   start  

Constants

DEFAULT_AGENT = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Firefox/1.5.0.4"

Attributes

agent  [RW] 
client  [RW] 
doc  [RW] 
response  [RW] 

Public Class methods

The default agent used is Mozilla (from linux Dapper Drake), but you can change it to something else.

Public Instance methods

Returns an Array of Hpricot objects that are the links on the current page. If you pass in matching as a regex (or any === compatible with String) then it’ll only return those links.

Makes the browser do a GET to this location. It takes the same params as HttpClient does for any method.

[Validate]