class RelatonOmg::Processor

Public Class Methods

new() click to toggle source
# File lib/relaton_omg/processor.rb, line 6
def initialize
  @short = :relaton_omg
  @prefix = "OMG"
  @defaultprefix = /^OMG /
  @idtype = "OMG"
end

Public Instance Methods

from_xml(xml) click to toggle source

@param xml [String] @return [RelatonIetf::IetfBibliographicItem]

# File lib/relaton_omg/processor.rb, line 23
def from_xml(xml)
  ::RelatonOmg::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_omg/processor.rb, line 17
def get(code, date, opts)
  ::RelatonOmg::OmgBibliography.get(code, date, opts)
end
grammar_hash() click to toggle source

Returns hash of XML grammar @return [String]

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

@param hash [Hash] @return [RelatonIetf::IetfBibliographicItem]

# File lib/relaton_omg/processor.rb, line 29
def hash_to_bib(hash)
  # item_hash = ::RelatonOmg::HashConverter.hash_to_bib(hash)
  ::RelatonOmg::OmgBibliographicItem.from_hash hash
end