Clean up syntax

This commit is contained in:
Brandon Robins
2017-11-21 01:01:02 -06:00
parent e4fde3d278
commit 74134e8209
3 changed files with 4 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ module Calligraphy
@resource.create_collection @resource.create_collection
set_content_location_header set_content_location_header
return :created return :created
end end

View File

@@ -138,7 +138,7 @@ module Calligraphy::Rails
def get(head: false) def get(head: false)
fresh_when(@resource, etag: @resource.etag) if @resource.readable? fresh_when(@resource, etag: @resource.etag) if @resource.readable?
Calligraphy::Get.new(web_dav_request).request(head: head) Calligraphy::Get.new(web_dav_request).request(head: head)
end end

View File

@@ -6,6 +6,8 @@ module Calligraphy
@resource.unlock lock_token_header @resource.unlock lock_token_header
end end
private
def lock_token_header def lock_token_header
@headers['Lock-Token'].gsub Calligraphy::LOCK_TOKEN_ANGLE_REGEX, '' @headers['Lock-Token'].gsub Calligraphy::LOCK_TOKEN_ANGLE_REGEX, ''
end end