class Relaton3gpp::Processor

Attributes

idtype[R]

Public Class Methods

new() click to toggle source
# File lib/relaton_3gpp/processor.rb, line 7
def initialize # rubocop:disable Lint/MissingSuper
  @short = :relaton_3gpp
  @prefix = "3GPP"
  @defaultprefix = %r{^3GPP\s}
  @idtype = "3GPP"
  @datasets = %w[status-smg-3GPP]
end

Public Instance Methods

fetch_data(_source, opts) click to toggle source

Fetch all the documents from xml2rfc.tools.ietf.org/public/rfc/bibxml-3gpp-new/

@param [String] _source source name @param [Hash] opts @option opts [String] :output directory to output documents @option opts [String] :format

# File lib/relaton_3gpp/processor.rb, line 31
def fetch_data(_source, opts)
  DataFetcher.fetch(**opts)
end
from_xml(xml) click to toggle source

@param xml [String] @return [RelatonBib::BibliographicItem]

# File lib/relaton_3gpp/processor.rb, line 37
def from_xml(xml)
  ::Relaton3gpp::XMLParser.from_xml xml
end
get(code, date, opts) click to toggle source

@param code [String] @param date [String, NilClass] year @param opts [Hash] @return [RelatonBib::BibliographicItem]

# File lib/relaton_3gpp/processor.rb, line 19
def get(code, date, opts)
  ::Relaton3gpp::Bibliography.get(code, date, opts)
end
grammar_hash() click to toggle source

Returns hash of XML grammar @return [String]

# File lib/relaton_3gpp/processor.rb, line 50
def grammar_hash
  @grammar_hash ||= ::Relaton3gpp.grammar_hash
end
hash_to_bib(hash) click to toggle source

@param hash [Hash] @return [RelatonBib::BibliographicItem]

# File lib/relaton_3gpp/processor.rb, line 43
def hash_to_bib(hash)
  item_hash = ::Relaton3gpp::HashConverter.hash_to_bib(hash)
  ::Relaton3gpp::BibliographicItem.new(**item_hash)
end