Module: Relaton::Cie::Bibliography
- Defined in:
- lib/relaton/cie/bibliography.rb
Overview
IETF bibliography module
Class Method Summary collapse
-
.get(code, _year = nil, _opts = {}) ⇒ Relaton::Cie::ItemData
Relaton of reference.
- .search(code) ⇒ Relaton::Cie::ItemData
Class Method Details
.get(code, _year = nil, _opts = {}) ⇒ Relaton::Cie::ItemData
Returns Relaton of reference.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/relaton/cie/bibliography.rb', line 18 def get(code, _year = nil, _opts = {}) Util.info "Fetching from Relaton repository ...", 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(code) ⇒ Relaton::Cie::ItemData
10 11 12 |
# File 'lib/relaton/cie/bibliography.rb', line 10 def search(code) Scrapper.scrape_page code end |