Sha256: a51b9b48df051b25d68453daebf7f5a29ffb17235cc637742cdd28200dac75b1
Contents?: true
Size: 532 Bytes
Versions: 7
Compression:
Stored size: 532 Bytes
Contents
require 'anemone/page' module Anemone class Tentacle # # Create a new Tentacle # def initialize(link_queue, page_queue) @link_queue = link_queue @page_queue = page_queue end # # Gets links from @link_queue, and returns the fetched # Page objects into @page_queue # def run while true do link = @link_queue.deq break if link == :END page = Page.fetch(link) @page_queue.enq(page) end end end end
Version data entries
7 entries across 7 versions & 2 rubygems