Class: Calligraphy::Put
- Inherits:
-
WebDavRequest
- Object
- WebDavRequest
- Calligraphy::Put
- Defined in:
- lib/calligraphy/web_dav_request/put.rb
Overview
Responsible for replacing the ‘Get` response entity of the resource.
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.
7 8 9 10 11 12 13 14 |
# File 'lib/calligraphy/web_dav_request/put.rb', line 7 def execute return :locked if @resource.locked_to_user? @headers return :method_not_allowed if @resource.collection? @resource.write [:created, @resource.contents] end |