Class: RelatonCalconnect::Hit

Inherits:
RelatonBib::Hit
  • Object
show all
Defined in:
lib/relaton_calconnect/hit.rb

Instance Method Summary collapse

Instance Method Details

#fetchRelatonCalconnect::CcBliographicItem

Parse page.

Returns:

  • (RelatonCalconnect::CcBliographicItem)


5
6
7
8
9
10
11
12
# File 'lib/relaton_calconnect/hit.rb', line 5

def fetch
  # @fetch ||= Scrapper.parse_page @hit
  @fetch ||= begin
    url = "#{HitCollection::GHURL}#{@hit[:file]}"
    resp = Faraday.get url
    CcBibliographicItem.from_hash YAML.safe_load(resp.body)
  end
end