lib/nistbib/hit_collection.rb in nistbib-0.1.8 vs lib/nistbib/hit_collection.rb in nistbib-0.1.9
- old
+ new
@@ -1,17 +1,16 @@
# frozen_string_literal: true
-require 'nistbib/hit'
-require 'nistbib/workers_pool'
+require "nistbib/hit"
require "addressable/uri"
-require 'open-uri'
+require "open-uri"
module NistBib
# Page of hit collection.
class HitCollection < Array
- DOMAIN = 'https://csrc.nist.gov'
+ DOMAIN = "https://csrc.nist.gov"
# @return [TrueClass, FalseClass]
attr_reader :fetched
# @return [String]
@@ -59,10 +58,10 @@
# @hit_pages = hit_pages
end
# @return [Iecbib::HitCollection]
def fetch
- workers = WorkersPool.new 4
+ workers = RelatonBib::WorkersPool.new 4
workers.worker(&:fetch)
each do |hit|
workers << hit
end
workers.end