class RelatonIetf::Processor
Public Class Methods
new()
click to toggle source
# File lib/relaton_ietf/processor.rb, line 6 def initialize @short = :relaton_ietf @prefix = "IETF" @defaultprefix = /^RFC / @idtype = "IETF" end
Public Instance Methods
from_xml(xml)
click to toggle source
@param xml [String] @return [RelatonIetf::IetfBibliographicItem]
# File lib/relaton_ietf/processor.rb, line 23 def from_xml(xml) ::RelatonIetf::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 [RelatonIetf::IetfBibliographicItem]
# File lib/relaton_ietf/processor.rb, line 17 def get(code, date, opts) ::RelatonIetf::IetfBibliography.get(code, date, opts) end
grammar_hash()
click to toggle source
Returns hash of XML grammar @return [String]
# File lib/relaton_ietf/processor.rb, line 35 def grammar_hash @grammar_hash ||= ::RelatonIetf.grammar_hash end
hash_to_bib(hash)
click to toggle source
@param hash [Hash] @return [RelatonIetf::IetfBibliographicItem]
# File lib/relaton_ietf/processor.rb, line 29 def hash_to_bib(hash) ::RelatonIetf::IetfBibliographicItem.from_hash hash end