Module: Relaton::Cie::Bibliography

Defined in:
lib/relaton/cie/bibliography.rb

Overview

IETF bibliography module

Class Method Summary collapse

Class Method Details

.get(code, _year = nil, _opts = {}) ⇒ Relaton::Cie::ItemData

Returns Relaton of reference.

Parameters:

  • code (String)

    the ECMA standard Code to look up (e..g “ECMA-6”)

  • year (String)

    not used

  • opts (Hash)

    not used

Returns:



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

Parameters:

  • code (String)

    the ECMA standard Code to look up (e..g “ECMA-6”)

Returns:



10
11
12
# File 'lib/relaton/cie/bibliography.rb', line 10

def search(code)
  Scrapper.scrape_page code
end