Sha256: 7060cea1db4eaddf0fda8606711cb3fd1fdd47fb2db070daf642c02c9f86dc5d
Contents?: true
Size: 1004 Bytes
Versions: 7
Compression:
Stored size: 1004 Bytes
Contents
require "relaton/processor" module RelatonUn class Processor < Relaton::Processor attr_reader :idtype def initialize @short = :relaton_un @prefix = "UN" @defaultprefix = %r{^UN\s} @idtype = "UN" end # @param code [String] # @param date [String, NilClass] year # @param opts [Hash] # @return [RelatonUn::UnBibliographicItem] def get(code, date, opts) ::RelatonUn::UnBibliography.get(code, date, opts) end # @param xml [String] # @return [RelatonIsoBib::IsoBibliographicItem] def from_xml(xml) ::RelatonUn::XMLParser.from_xml xml end # @param hash [Hash] # @return [RelatonIsoBib::IsoBibliographicItem] def hash_to_bib(hash) item_hash = ::RelatonUn::HashConverter.hash_to_bib(hash) ::RelatonIsoBib::UnBibliographicItem.new item_hash end # Returns hash of XML grammar # @return [String] def grammar_hash @grammar_hash ||= ::RelatonUn.grammar_hash end end end
Version data entries
7 entries across 7 versions & 1 rubygems