Module: Relaton::Omg::Bibliography
Overview
OMG bibliography module
Instance Method Summary collapse
Instance Method Details
#get(code, _year = nil, _opts = {}) ⇒ Relaton::Omg::Item
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/relaton/omg/bibliography.rb', line 19 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.content}`", key: code else Util.info "Not found.", key: code end result end |
#search(text) ⇒ Relaton::Omg::Item
11 12 13 |
# File 'lib/relaton/omg/bibliography.rb', line 11 def search(text) Scraper.scrape_page text end |