lib/spidr/agent.rb in spidr-0.1.6 vs lib/spidr/agent.rb in spidr-0.1.7
- old
+ new
@@ -328,15 +328,23 @@
@urls_like_blocks[pattern] << block
return self
end
#
- # For every Page that the agent visits it will be passed to the
+ # For every Page that the agent visits, pass the page to the
# specified _block_.
#
def every_page(&block)
@every_page_blocks << block
return self
+ end
+
+ #
+ # For every Page that the agent visits, pass the headers to the given
+ # _block_.
+ #
+ def all_headers(&block)
+ every_page { |page| block.call(page.headers) }
end
#
# Clears the history of the agent.
#