Module: Relaton::Plateau::Bibliography
Instance Method Summary collapse
Instance Method Details
#get(code, _year = nil, _opts = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/relaton/plateau/bibliography.rb', line 10 def get(code, _year = nil, _opts = {}) Util.info "Fetching ...", key: code result = search(code).fetch_doc if result Util.info "Found `#{result.docidentifier.first.content}`", key: code result else Util.warn "Not found.", key: code end rescue StandardError => e raise Error, e. end |
#search(code) ⇒ Object
6 7 8 |
# File 'lib/relaton/plateau/bibliography.rb', line 6 def search(code) HitCollection.new(code).find end |