Module: Sinatra::WebDAV
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Defined in: | sinatra-contrib/lib/sinatra/webdav.rb |
Overview
This extensions provides WebDAV
verbs, as defined by RFC 4918
(https://tools.ietf.org/html/rfc4918). To use this in your app,
just register it:
require 'sinatra/base' require 'sinatra/webdav'
class Application < Sinatra::Base register Sinatra::WebDAV
# Now you can use any WebDAV verb:
propfind '/2014/january/21' do
'I have a lunch at 9 PM'
end
end
You can use it in classic application just by requiring the extension:
require 'sinatra' require 'sinatra/webdav'
mkcol '/2015' do 'You started 2015!' end
Class Method Summary
Instance Method Summary
- #copy(path, opts = {}, &bk)
- #mkcol(path, opts = {}, &bk)
- #move(path, opts = {}, &bk)
- #propfind(path, opts = {}, &bk)
- #proppatch(path, opts = {}, &bk)
-
#unlock(path, opts = {}, &bk)
def lock(path, opts = {}, &bk) route 'LOCK', path, opts, &bk end.
Class Method Details
.registered(_)
[ GitHub ]Instance Method Details
#copy(path, opts = {}, &bk)
[ GitHub ]# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 86
def copy(path, opts = {}, &bk) route 'COPY', path, opts, &bk end
#mkcol(path, opts = {}, &bk)
[ GitHub ]# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 85
def mkcol(path, opts = {}, &bk) route 'MKCOL', path, opts, &bk end
#move(path, opts = {}, &bk)
[ GitHub ]# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 87
def move(path, opts = {}, &bk) route 'MOVE', path, opts, &bk end
#propfind(path, opts = {}, &bk)
[ GitHub ]# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 83
def propfind(path, opts = {}, &bk) route 'PROPFIND', path, opts, &bk end
#proppatch(path, opts = {}, &bk)
[ GitHub ]# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 84
def proppatch(path, opts = {}, &bk) route 'PROPPATCH', path, opts, &bk end
#unlock(path, opts = {}, &bk)
def lock(path, opts = {}, &bk) route 'LOCK', path, opts, &bk end
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 89
def unlock(path, opts = {}, &bk) route 'UNLOCK', path, opts, &bk end