Class: WebDavResource

Inherits:
Object
  • Object
show all
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

Instance Method Details

#childrenObject



29
30
31
# File 'lib/serve_webdav/resource.rb', line 29

def children
  return []
end

#collection?Boolean

Returns:

  • (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_displaynameObject



33
34
35
# File 'lib/serve_webdav/resource.rb', line 33

def get_displayname
  CGI::escape(self.displayname).gsub(/\+/, '%20')
end

#get_hrefObject



37
38
39
# File 'lib/serve_webdav/resource.rb', line 37

def get_href
  self.href.gsub(/\+/, '%20')
end

#get_propertiesObject



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

#propertiesObject



5
6
7
# File 'lib/serve_webdav/resource.rb', line 5

def properties
  Array.new
end

#statusObject



21
22
23
# File 'lib/serve_webdav/resource.rb', line 21

def status
  gen_status(200, "OK").to_s
end