Method: Spidr::Page#initialize

Defined in:
lib/spidr/page.rb

#initialize(url, response) ⇒ Page

Creates a new Page object.

Parameters:

  • url (URI::HTTP)

    The URL of the page.

  • response (Net::HTTPResponse)

    The response from the request for the page.



27
28
29
30
31
32
# File 'lib/spidr/page.rb', line 27

def initialize(url,response)
  @url      = url
  @response = response
  @headers  = response.to_hash
  @doc      = nil
end