Sha256: 696acea7e35be61c9fa4569ed8aa4e1a388ef1bbef0ae0301da0c147a5814943
Contents?: true
Size: 402 Bytes
Versions: 4
Compression:
Stored size: 402 Bytes
Contents
module ActiveFedora::Core class FedoraIdTranslator SLASH = '/'.freeze def self.call(id) id = URI::DEFAULT_PARSER.escape(id, '[]'.freeze) id = "/#{id}" unless id.start_with? SLASH id = ActiveFedora.fedora.base_path + id unless ActiveFedora.fedora.base_path == SLASH || id.start_with?("#{ActiveFedora.fedora.base_path}/") ActiveFedora.fedora.host + id end end end
Version data entries
4 entries across 4 versions & 1 rubygems