class Isobib::HitCollection
Page of hit collection.
Attributes
fetched[R]
@return [TrueClass, FalseClass]
hit_pages[R]
@return [Isobib::HitPages]
Public Class Methods
new(hits, hit_pages = nil)
click to toggle source
@param hits [Array<Hash>]
# File lib/isobib/hit_collection.rb, line 15 def initialize(hits, hit_pages = nil) concat(hits.map { |h| Hit.new(h, self) }) @fetched = false @hit_pages = hit_pages end
Public Instance Methods
fetch()
click to toggle source
@return [Isobib::HitCollection]
# File lib/isobib/hit_collection.rb, line 22 def fetch workers = WorkersPool.new 4 workers.worker(&:fetch) each do |hit| workers << hit end workers.end workers.result @fetched = true self end
inspect()
click to toggle source
# File lib/isobib/hit_collection.rb, line 38 def inspect "<#{self.class}:#{format('%#.14x', object_id << 1)} @fetched=#{@fetched}>" end
to_s()
click to toggle source
# File lib/isobib/hit_collection.rb, line 34 def to_s inspect end