Class: RelatonIho::HitCollection

Inherits:
RelatonBib::HitCollection
  • Object
show all
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

Constructor Details

#initialize(ref, year = nil) ⇒ HitCollection

Returns a new instance of HitCollection.

Parameters:

  • ref (Strig)
  • year (String) (defaults to: nil)
  • opts (Hash)


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