Sha256: 57253a085fd6b8434895b792de71c3862b2fd1562d9777ee19619c1a364e7b15
Contents?: true
Size: 640 Bytes
Versions: 1
Compression:
Stored size: 640 Bytes
Contents
require 'active_fedora/noid/version' require 'active_fedora/noid/config' require 'active_fedora/noid/service' require 'active_fedora/noid/synchronized_minter' module ActiveFedora module Noid class << self def configure(&block) yield config end def config @config ||= Config.new end def treeify(identifier) raise ArgumentError, 'Identifier must be a string of size > 0 in order to be treeified' if identifier.blank? head = identifier.split('/').first head.gsub!(/#.*/, '') (head.scan(/..?/).first(4) + [identifier]).join('/') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_fedora-noid-1.1.3 | lib/active_fedora/noid.rb |