Module: RfcBib::RfcBibliography

Defined in:
lib/rfcbib/rfc_bibliography.rb

Overview

RFC bibliography module

Class Method Summary collapse

Class Method Details

.get(code, _year, _opts) ⇒ IsoBibItem::BibliographicItem

Returns Relaton of reference.

Parameters:

  • code (String)

    the ISO standard Code to look up (e..g “ISO 9000”)

  • year (String)

    the year the standard was published (optional)

  • opts (Hash)

    options; restricted to :all_parts if all-parts reference is required

Returns:

  • (IsoBibItem::BibliographicItem)

    Relaton of reference



19
20
21
# File 'lib/rfcbib/rfc_bibliography.rb', line 19

def get(code, _year, _opts)
  search code
end

.search(text) ⇒ IsoBibItem::BibliographicItem

Parameters:

  • code (String)

    the ISO standard Code to look up (e..g “ISO 9000”)

Returns:

  • (IsoBibItem::BibliographicItem)


11
12
13
# File 'lib/rfcbib/rfc_bibliography.rb', line 11

def search(text)
  Scrapper.scrape_page text
end