Module: RelatonCalconnect::Scrapper

Defined in:
lib/relaton_calconnect/scrapper.rb

Constant Summary collapse

DOMAIN =
"https://standards.calconnect.org/".freeze

Class Method Summary collapse

Class Method Details

.parse_page(hit) ⇒ RelatonOgc::OrcBibliographicItem

papam hit [Hash]

Returns:

  • (RelatonOgc::OrcBibliographicItem)


9
10
11
12
13
14
15
# File 'lib/relaton_calconnect/scrapper.rb', line 9

def parse_page(hit)
  link = hit["link"].detect { |l| l["type"] == "rxl" }
  if link
    bib_xml = fetch_bib_xml link["content"]
    XMLParser.from_xml bib_xml
  end
end