Sha256: 15528ebb4a37e51e9e0d45857f93ebc92082e430915c07a204466b53f7eb38c9
Contents?: true
Size: 948 Bytes
Versions: 27
Compression:
Stored size: 948 Bytes
Contents
# frozen_string_literal:true require "relaton_ietf/scrapper" module RelatonIetf # IETF bibliography module module IetfBibliography class << self # @param code [String] the ISO standard Code to look up (e..g "ISO 9000") # @return [RelatonIetf::IetfBibliographicItem] def search(text) Scrapper.scrape_page text end # @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 def get(code, _year = nil, _opts = {}) warn "[relaton-ietf] (\"#{code}\") fetching..." result = search code warn "[relaton-ietf] (\"#{code}\") found #{result.docidentifier.first.id}" result end end end end
Version data entries
27 entries across 27 versions & 2 rubygems