Module: Sufia::Noid
- Included in:
- Batch, BatchController, GenericFile
- Defined in:
- lib/sufia/noid.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.namespaceize(identifier) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/sufia/noid.rb', line 21 def Noid.namespaceize(identifier) if identifier.start_with?(Noid.namespace) identifier else "#{Noid.namespace}:#{identifier}" end end |
.noidify(identifier) ⇒ Object
17 18 19 |
# File 'lib/sufia/noid.rb', line 17 def Noid.noidify(identifier) identifier.split(":").last end |
Instance Method Details
#normalize_identifier ⇒ Object
33 34 35 |
# File 'lib/sufia/noid.rb', line 33 def normalize_identifier params[:id] = Noid.namespaceize(params[:id]) end |