Class: Cosmicrawler::Em::HttpCrawler
- Inherits:
-
Object
- Object
- Cosmicrawler::Em::HttpCrawler
- Includes:
- Cosmicrawler::Em
- Defined in:
- lib/cosmicrawler/em/http_crawler.rb
Instance Method Summary collapse
Methods included from Cosmicrawler::Em
Instance Method Details
#crawl(urls, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/cosmicrawler/em/http_crawler.rb', line 9 def crawl urls, &block raise unless block_given? iterate(urls) do |url| request = ::EM::HttpRequest.new(url) block.call request end end |