123456789_123456789_123456789_123456789_123456789_

Module: Sinatra::WebDAV::Request

Relationships & Source Files
Defined in: sinatra-contrib/lib/sinatra/webdav.rb

Class Method Summary

Instance Attribute Summary

Class Method Details

.included(base)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 39

def self.included(base)
  base.class_eval do
    alias_method :_safe?, :safe?
    alias_method :_idempotent?, :idempotent?

    def safe?
      _safe? or propfind?
    end

    def idempotent?
      _idempotent? or propfind? or move? or unlock? # or lock?
    end
  end
end

Instance Attribute Details

#copy?Boolean (readonly)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 66

def copy?
  request_method == 'COPY'
end

#mkcol?Boolean (readonly)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 62

def mkcol?
  request_method == 'MKCOL'
end

#move?Boolean (readonly)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 70

def move?
  request_method == 'MOVE'
end

#propfind?Boolean (readonly)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 54

def propfind?
  request_method == 'PROPFIND'
end

#proppatch?Boolean (readonly)

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 58

def proppatch?
  request_method == 'PROPPATCH'
end

#unlock?Boolean (readonly)

def lock? request_method == 'LOCK' end

[ GitHub ]

  
# File 'sinatra-contrib/lib/sinatra/webdav.rb', line 78

def unlock?
  request_method == 'UNLOCK'
end