class Fedora::Repository
def update(object)
boolean:: whether the operation is successful
== Return
Update the given object
def update(object) raise ArgumentError, "Missing pid attribute" if object.nil? || object.pid.nil? case object when Fedora::FedoraObject response = connection.put("#{url_for(object)}?" + object.attributes.to_fedora_query) response.code == '200' || '307' when Fedora::Datastream raise ArgumentError, "Missing dsID attribute" if object.dsid.nil? response = connection.put("#{url_for(object)}?" + object.attributes.to_fedora_query, object.blob) response.code == '200' || '201' return response.code else raise ArgumentError, "Unknown object type" end end