module SimpleCrawler
	class Document
		attr_accessor :uri, :data, :headers, :fetched_at, :http_status
    attr_accessor :location, :nest

    def initialize
      @nest = 0
    end

		def to_s
			puts "Document"
			puts " .uri:\t\t#{uri}"
			puts " .fetched_at:\t#{fetched_at}"
			puts " .http_status:\t#{http_status}"
			puts " .headers:"
			for header in headers
				puts "   #{header[0]}: #{header[1]}"
			end
      puts " .nest:\t#{nest}"
      puts " .location:\t#{location}"
			puts " .data.length:\t#{(data.length)}"   
		end
	end
end
