Class: Calligraphy::Put

Inherits:
WebDavRequest show all
Defined in:
lib/calligraphy/put.rb

Instance Attribute Summary

Attributes inherited from WebDavRequest

#headers, #resource, #response

Instance Method Summary collapse

Methods inherited from WebDavRequest

#initialize

Constructor Details

This class inherits a constructor from Calligraphy::WebDavRequest

Instance Method Details

#requestObject



3
4
5
6
7
8
9
10
# File 'lib/calligraphy/put.rb', line 3

def request
  return :locked if @resource.locked_to_user? @headers
  return :method_not_allowed if @resource.collection?

  @resource.write

  return :created, @resource.contents
end