Class: Calligraphy::WebDavRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/calligraphy/web_dav_request/web_dav_request.rb

Overview

Base class for WebDavRequests.

‘WebDavRequest` exposes the `request` method, which is used by the `WebDavRequestsController` to execute the WebDAV request for a particular resource. This class also provides private methods for accessing the request body, setting response headers, and creating XML responses.

Direct Known Subclasses

Copy, Delete, Get, Lock, Mkcol, Propfind, Proppatch, Put, Unlock

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers:, request:, response:, resource:) ⇒ WebDavRequest

:nodoc:



15
16
17
18
19
20
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 15

def initialize(headers:, request:, response:, resource:)
  @headers = headers
  @request = request
  @response = response
  @resource = resource
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



12
13
14
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 12

def headers
  @headers
end

#requestObject (readonly)

Returns the value of attribute request.



12
13
14
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 12

def request
  @request
end

#resourceObject

Returns the value of attribute resource.



11
12
13
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 11

def resource
  @resource
end

#responseObject

Returns the value of attribute response.



11
12
13
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 11

def response
  @response
end

Instance Method Details

#executeObject

Executes the WebDAV request for a particular resource.

Raises:

  • (NotImplemented)


23
24
25
# File 'lib/calligraphy/web_dav_request/web_dav_request.rb', line 23

def execute
  raise NotImplemented
end