lib/prss/downloader.rb in prss-0.0.2 vs lib/prss/downloader.rb in prss-0.0.3

- old
+ new

@@ -1,10 +1,12 @@ require 'typhoeus' require 'pathname' module PRSS class Downloader + attr_reader :hydra + def initialize(links) @links = links @hydra = Typhoeus::Hydra.new end @@ -18,13 +20,13 @@ request.on_complete do |response| @files << save_file(response, output) end - @hydra.queue request + hydra.queue request end - @hydra.run + hydra.run @files end def save_file response, output