Class: Relaton::Plateau::HitCollection
- Inherits:
-
Core::HitCollection
- Object
- Core::HitCollection
- Relaton::Plateau::HitCollection
- Defined in:
- lib/relaton/plateau/hit_collection.rb
Constant Summary collapse
- ENDPOINT =
"https://raw.githubusercontent.com/relaton/relaton-data-plateau/data-v2/"
Instance Method Summary collapse
Instance Method Details
#fetch_doc ⇒ Object
19 20 21 22 23 |
# File 'lib/relaton/plateau/hit_collection.rb', line 19 def fetch_doc return unless any? all_editions? ? to_all_editions : first.item end |
#find ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/relaton/plateau/hit_collection.rb', line 8 def find @array = index.search do |row| if all_editions? row[:id].sub(/ \d+\.\d+$/, "") == @ref else row[:id] == @ref end end.map { |row| Hit.new(row, self) } self end |