module RelatonIetf::IetfBibliography
IETF bibliography module
Public Class Methods
get(code, _year = nil, _opts = {})
click to toggle source
@param code [String] the ISO standard Code to look up (e..g “ISO 9000”) @param year [String] the year the standard was published (optional) @param opts [Hash] options; restricted to :all_parts if all-parts
reference is required
@return [RelatonIetf::IetfBibliographicItem] Relaton
of reference
# 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)
click to toggle source
@param code [String] the ISO standard Code to look up (e..g “ISO 9000”) @return [RelatonIetf::IetfBibliographicItem]
# File lib/relaton_ietf/ietf_bibliography.rb, line 11 def search(text) Scrapper.scrape_page text end