Class: RelatonBib::HitCollection
- Inherits:
-
Array
- Object
- Array
- RelatonBib::HitCollection
- Defined in:
- lib/relaton_bib/hit_collection.rb
Instance Attribute Summary collapse
- #fetched ⇒ TrueClass, FalseClass readonly
- #text ⇒ String readonly
- #year ⇒ String readonly
Instance Method Summary collapse
Instance Attribute Details
#fetched ⇒ TrueClass, FalseClass (readonly)
4 5 6 |
# File 'lib/relaton_bib/hit_collection.rb', line 4 def fetched @fetched end |
#text ⇒ String (readonly)
7 8 9 |
# File 'lib/relaton_bib/hit_collection.rb', line 7 def text @text end |
#year ⇒ String (readonly)
10 11 12 |
# File 'lib/relaton_bib/hit_collection.rb', line 10 def year @year end |
Instance Method Details
#fetch ⇒ RelatonIso::HitCollection
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/relaton_bib/hit_collection.rb', line 13 def fetch workers = WorkersPool.new 4 workers.worker(&:fetch) each do |hit| workers << hit end workers.end workers.result @fetched = true self end |
#inspect ⇒ String
30 31 32 |
# File 'lib/relaton_bib/hit_collection.rb', line 30 def inspect "<#{self.class}:#{format('%#.14x', object_id << 1)} @fetched=#{@fetched}>" end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/relaton_bib/hit_collection.rb', line 25 def to_s inspect end |