I didn't check if it's possible to do with Net::HTTP, but you can use Curb, which is the Ruby wrapper for curl.
Look at Curl::Easy#http_head
With Net::HTTP you can also use HTTP#head, which requests headers from the server using the HEAD method.
Information about HTTP's method HEAD:
9.4 HEAD
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.
To get the response code of a page:
require 'net/http'
response = nil
Net::HTTP.start('www.example.com', 80) {|http|
response = http.head('/page.html')
}
puts response.code