Sha256: e2e9a1fe934c144d0c50253f3fc31f4f915ce2fbafeedf3fa08fc94e5760dfac

Contents?: true

Size: 365 Bytes

Versions: 16

Compression:

Stored size: 365 Bytes

Contents

module ActiveFedora::Core
  class FedoraIdTranslator
    SLASH = '/'.freeze
    def self.call(id)
      id = "/#{id}" unless id.start_with? SLASH
      unless ActiveFedora.fedora.base_path == SLASH || id.start_with?("#{ActiveFedora.fedora.base_path}/")
        id = ActiveFedora.fedora.base_path + id
      end
      ActiveFedora.fedora.host + id
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
active-fedora-9.0.8 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.6.1 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.5.0 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.4.3 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.4.2 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.4.1 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.4.0 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.3.0 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.2.1 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.2.0 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.2.0.rc2 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.2.0.rc1 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.1.2 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.1.1 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.1.0 lib/active_fedora/core/fedora_id_translator.rb
active-fedora-9.1.0.rc1 lib/active_fedora/core/fedora_id_translator.rb