Sha256: 7a7d678628a00ce03d00e7c354ef1cc60240d06bac19bc37a505e12494dd4e6b
Contents?: true
Size: 1.21 KB
Versions: 6
Compression:
Stored size: 1.21 KB
Contents
require "relaton/processor" module RelatonDoi class Processor < Relaton::Processor attr_reader :idtype def initialize @short = :relaton_doi @prefix = "DOI" @defaultprefix = %r{^doi:} @idtype = "DOI" # @datasets = %w[bipm-data-outcomes bipm-si-brochure] end # @param code [String] DOI # @param date [String, nil] year # @param opts [Hash] # @return [RelatonBib::BibliographicItem] def get(code, _date, _opts) Crossref.get(code) end # # @param [String] source source name # @param [Hash] opts # @option opts [String] :output directory to output documents # @option opts [String] :format # # def fetch_data(source, opts) # DataFetcher.fetch(source, **opts) # end # @param xml [String] # @return [RelatonBipm::BipmBibliographicItem] def from_xml(xml) ::RelatonBib::XMLParser.from_xml xml end # @param hash [Hash] # @return [RelatonBipm::BipmBibliographicItem] def hash_to_bib(hash) ::RelatonBib::BibliographicItem.from_hash hash end # Returns hash of XML grammar # @return [String] def grammar_hash @grammar_hash ||= ::RelatonBib.grammar_hash end end end
Version data entries
6 entries across 6 versions & 1 rubygems