Class: WebDavResource
- Inherits:
-
Object
- Object
- WebDavResource
- Defined in:
- lib/serve_webdav/resource.rb
Overview
Copyright © 2006 Stuart Eccles Released under the MIT License. See the LICENSE file for more details.
Instance Method Summary collapse
- #children ⇒ Object
- #collection? ⇒ Boolean
- #copy!(dest_path, depth) ⇒ Object
- #delete! ⇒ Object
- #get_displayname ⇒ Object
- #get_href ⇒ Object
- #get_properties ⇒ Object
- #move!(dest_path, depth) ⇒ Object
- #properties ⇒ Object
- #status ⇒ Object
Instance Method Details
#children ⇒ Object
29 30 31 |
# File 'lib/serve_webdav/resource.rb', line 29 def children return [] end |
#collection? ⇒ Boolean
25 26 27 |
# File 'lib/serve_webdav/resource.rb', line 25 def collection? return false end |
#copy!(dest_path, depth) ⇒ Object
17 18 19 |
# File 'lib/serve_webdav/resource.rb', line 17 def copy! (dest_path, depth) end |
#delete! ⇒ Object
9 10 11 |
# File 'lib/serve_webdav/resource.rb', line 9 def delete! end |
#get_displayname ⇒ Object
33 34 35 |
# File 'lib/serve_webdav/resource.rb', line 33 def get_displayname CGI::escape(self.displayname).gsub(/\+/, '%20') end |
#get_href ⇒ Object
37 38 39 |
# File 'lib/serve_webdav/resource.rb', line 37 def get_href self.href.gsub(/\+/, '%20') end |
#get_properties ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/serve_webdav/resource.rb', line 41 def get_properties hsh = {} self.properties.each do|meth| if self.respond_to?('get_'+meth.to_s) hsh[meth] = self.send(('get_'+meth.to_s).to_sym) else hsh[meth] = self.send(meth) end end hsh end |
#move!(dest_path, depth) ⇒ Object
13 14 15 |
# File 'lib/serve_webdav/resource.rb', line 13 def move! (dest_path, depth) end |
#properties ⇒ Object
5 6 7 |
# File 'lib/serve_webdav/resource.rb', line 5 def properties Array.new end |
#status ⇒ Object
21 22 23 |
# File 'lib/serve_webdav/resource.rb', line 21 def status gen_status(200, "OK").to_s end |