Sha256: 4ba024c2b215fe4f94b66c4ed92f4687af81d3b9420f4f83de87b3d8528bffb8
Contents?: true
Size: 1.07 KB
Versions: 33
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true module Hyrax module Identifier class Registrar class << self ## # @param type [Symbol] # @param opts [Hash] # @option opts [Hyrax::Identifier::Builder] :builder # # @return [Hyrax::Identifier::Registrar] a registrar for the given type def for(type, **opts) return Hyrax.config.identifier_registrars[type].new(**opts) if Hyrax.config.identifier_registrars.include?(type) raise ArgumentError, "Hyrax::Identifier::Registrar not found to handle #{type}" end end ## # @!attribute builder [rw] # @return [Hyrax::Identifier::Builder] attr_accessor :builder ## # @param builder [Hyrax::Identifier::Builder] def initialize(builder:) @builder = builder end ## # @abstract # # @param object [#id] # # @return [#identifier] # @raise [NotImplementedError] when the method is abstract def register!(*) raise NotImplementedError end end end end
Version data entries
33 entries across 33 versions & 1 rubygems