Method: Rubydora::DigitalObject.find

Defined in:
lib/rubydora/digital_object.rb

.find(pid, repository = nil, options = {}) ⇒ Object

Find an existing Fedora object

Raises:



53
54
55
56
57
58
59
60
# File 'lib/rubydora/digital_object.rb', line 53

def self.find(pid, repository = nil, options = {})
  obj = self.new pid, repository, options
  if obj.new?
    raise Rubydora::RecordNotFound, "DigitalObject.find called for an object that doesn't exist"
  end

  obj
end