Module: Dor::Identifiable::ClassMethods

Defined in:
lib/dor/models/concerns/identifiable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#object_typeObject (readonly)

Returns the value of attribute object_type.



17
18
19
# File 'lib/dor/models/concerns/identifiable.rb', line 17

def object_type
  @object_type
end

Instance Method Details

#assign_pid(_obj) ⇒ Object

Overrides the method in ActiveFedora to mint a pid using SURI rather than the default Fedora sequence



25
26
27
28
29
# File 'lib/dor/models/concerns/identifiable.rb', line 25

def assign_pid(_obj)
  return Dor::SuriService.mint_id if Dor::Config.suri.mint_ids

  super
end

#has_object_type(str) ⇒ Object



18
19
20
21
# File 'lib/dor/models/concerns/identifiable.rb', line 18

def has_object_type(str)
  @object_type = str
  Dor.registered_classes[str] = self
end