class RelatonW3c::W3cBibliography

Class methods for search W3C standards.

Public Class Methods

get(ref, _year = nil, _opts = {}) click to toggle source

@param ref [String] the W3C standard Code to look up @param year [String, NilClass] not used @param opts [Hash] options @return [RelatonW3c::W3cBibliographicItem]

# File lib/relaton_w3c/w3c_bibliography.rb, line 24
def get(ref, _year = nil, _opts = {})
  warn "[relaton-w3c] (\"#{ref}\") fetching..."
  result = search(ref)
  return unless result.any?

  ret = result.first.fetch
  warn "[relaton-w3c] (\"#{ref}\") found #{ret.title.first.title.content}"
  ret
end