Class: Calligraphy::Copy
- Inherits:
-
WebDavRequest
- Object
- WebDavRequest
- Calligraphy::Copy
- Defined in:
- lib/calligraphy/web_dav_request/copy.rb
Overview
Responsible for creating a duplicate of the source resource identified by the request to the destination resource identified by the URI in the Destination header.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from WebDavRequest
#headers, #request, #resource, #response
Instance Method Summary collapse
-
#execute ⇒ Object
Executes the WebDAV request for a particular resource.
Methods inherited from WebDavRequest
Constructor Details
This class inherits a constructor from Calligraphy::WebDavRequest
Instance Method Details
#execute ⇒ Object
Executes the WebDAV request for a particular resource.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/calligraphy/web_dav_request/copy.rb', line 9 def execute = = @resource. unless [:can_copy] return :precondition_failed if [:ancestor_exist] return :conflict end return :locked if [:locked] overwritten = @resource.copy overwritten ? :no_content : :created end |