There are multiple tools available. I use Nokogiri.
Demo:
require 'rubygems'
require 'nokogiri'
doc = Nokogiri::HTML(%{
<h1 class="title">Hello, World</h1>
<p>Some text</p>
<a href="http://www.google.com/">Some link</a>
})
title = doc.at_css("h1.title").text
content = doc.at_css("p").text
url = doc.at_css("a")[:href]
Ryan Bates made an excelent screencast about using it: #190: Screen Scraping with Nokogiri.
Documentation: http://nokogiri.org/
Tutorials: http://nokogiri.org/tutorials