Files
calligraphy/lib/calligraphy/unlock.rb
Brandon Robins 74134e8209 Clean up syntax
2017-11-21 01:01:02 -06:00

16 lines
305 B
Ruby

module Calligraphy
class Unlock < WebDavRequest
def request
return :bad_request if @headers['Lock-Token'].nil?
@resource.unlock lock_token_header
end
private
def lock_token_header
@headers['Lock-Token'].gsub Calligraphy::LOCK_TOKEN_ANGLE_REGEX, ''
end
end
end