Module: RelatonOmg::OmgBibliography
- Defined in:
- lib/relaton_omg/omg_bibliography.rb
Overview
OMG bibliography module
Class Method Summary collapse
- .get(code, _year = nil, _opts = {}) ⇒ RelatonOmg::OmgBibliographicItem
- .search(text) ⇒ RelatonOmg::OmgBibliographicItem
Class Method Details
.get(code, _year = nil, _opts = {}) ⇒ RelatonOmg::OmgBibliographicItem
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/relaton_omg/omg_bibliography.rb', line 17 def get(code, _year = nil, _opts = {}) Util.info "Fetching from www.omg.org ...", key: code result = search code if result Util.info "Found: `#{result.docidentifier.first.id}`", key: code else Util.info "Not found.", key: code end result end |
.search(text) ⇒ RelatonOmg::OmgBibliographicItem
9 10 11 |
# File 'lib/relaton_omg/omg_bibliography.rb', line 9 def search(text) Scraper.scrape_page text end |