module ActiveFedora::Noid

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/active_fedora/noid.rb, line 16
def config
  @config ||= Config.new
end
configure() { |config| ... } click to toggle source
# File lib/active_fedora/noid.rb, line 12
def configure
  yield config
end
treeify(identifier) click to toggle source
# File lib/active_fedora/noid.rb, line 20
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