Method: Calligraphy::Delete#execute

Defined in:
lib/calligraphy/web_dav_request/delete.rb

#executeObject

Executes the WebDAV request for a particular resource.



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/calligraphy/web_dav_request/delete.rb', line 7

def execute
  return :locked if @resource.locked_to_user? @headers

  if @resource.collection?
    @resource.delete_collection

    return :no_content
  else
    return :not_found unless @resource.exists?
  end

  :no_content
end