Module: RelatonIetf::IetfBibliography
- Defined in:
- lib/relaton_ietf/ietf_bibliography.rb
Overview
IETF bibliography module
Class Method Summary collapse
-
.get(code, _year = nil, _opts = {}) ⇒ RelatonIetf::IetfBibliographicItem
Relaton of reference.
- .search(text) ⇒ RelatonIetf::IetfBibliographicItem
Class Method Details
.get(code, _year = nil, _opts = {}) ⇒ RelatonIetf::IetfBibliographicItem
Returns Relaton of reference.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/relaton_ietf/ietf_bibliography.rb', line 20 def get(code, _year = nil, _opts = {}) warn "[relaton-ietf] (\"#{code}\") fetching..." result = search code if result warn "[relaton-ietf] (\"#{code}\") found #{result.docidentifier.first.id}" else warn "[relaton-ietf] (\"#{code}\") not found" end result end |
.search(text) ⇒ RelatonIetf::IetfBibliographicItem
11 12 13 |
# File 'lib/relaton_ietf/ietf_bibliography.rb', line 11 def search(text) Scrapper.scrape_page text end |