Class: Hpricot::Elem
- Inherits:
-
Object
- Object
- Hpricot::Elem
- Defined in:
- lib/davclient/hpricot_extensions.rb
Instance Method Summary collapse
-
#href ⇒ Object
Resource url.
-
#isCollection? ⇒ Boolean
Returns true of resource is a collection, i.e.
-
#method_missing(method_name, *args) ⇒ Object
Makes properties available as simple method calls.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
Makes properties available as simple method calls.
Example:
print item.creationdate()
16 17 18 19 20 21 |
# File 'lib/davclient/hpricot_extensions.rb', line 16 def method_missing(method_name, *args) if(args.size == 0) then return property(method_name.to_s) end raise "Method missing" end |
Instance Method Details
#href ⇒ Object
Resource url
24 25 26 |
# File 'lib/davclient/hpricot_extensions.rb', line 24 def href() self.at("d:href").innerText end |
#isCollection? ⇒ Boolean
Returns true of resource is a collection, i.e. a folder and not a file.
29 30 31 |
# File 'lib/davclient/hpricot_extensions.rb', line 29 def isCollection?() self.at("d:collection") != nil end |