Class: RelatonIho::HitCollection
- Inherits:
-
RelatonBib::HitCollection
- Object
- RelatonBib::HitCollection
- RelatonIho::HitCollection
- Defined in:
- lib/relaton_iho/hit_collection.rb
Constant Summary collapse
- ENDPOINT =
"https://raw.githubusercontent.com/relaton/relaton-data-iho/master/data/".freeze
Instance Method Summary collapse
-
#initialize(ref, year = nil) ⇒ HitCollection
constructor
A new instance of HitCollection.
Constructor Details
#initialize(ref, year = nil) ⇒ HitCollection
Returns a new instance of HitCollection.
12 13 14 15 16 17 |
# File 'lib/relaton_iho/hit_collection.rb', line 12 def initialize(ref, year = nil) super @array = from_yaml(ref).sort_by do |hit| hit.hit["revdate"] ? Date.parse(hit.hit["revdate"]) : Date.new end.reverse end |