class Tilia::CardDav::AddressBookRoot
AddressBook
rootnode
This object lists a collection of users, which can contain addressbooks.
Attributes
CardDAV backend
@var BackendBackendInterface
Principal Backend
@var SabreDAVACLPrincipalBackendBackendInteface
Public Class Methods
Constructor
This constructor needs both a principal and a carddav backend.
By default this class will show a list of addressbook collections for principals in the 'principals' collection. If your main principals are actually located in a different path, use the principal_prefix argument to override this.
@param DAVACLPrincipalBackendBackendInterface principal_backend
@param BackendBackendInterface carddav_backend
@param string principal_prefix
# File lib/tilia/card_dav/address_book_root.rb, line 33 def initialize(principal_backend, carddav_backend, principal_prefix = 'principals') @carddav_backend = carddav_backend super(principal_backend, principal_prefix) end
Public Instance Methods
This method returns a node for a principal.
The passed array contains principal information, and is guaranteed to at least contain a uri item. Other properties may or may not be supplied by the authentication backend.
@param array principal @return SabreDAVINode
# File lib/tilia/card_dav/address_book_root.rb, line 53 def child_for_principal(principal) AddressBookHome.new(@carddav_backend, principal['uri']) end
Returns the name of the node
@return string
# File lib/tilia/card_dav/address_book_root.rb, line 41 def name Plugin::ADDRESSBOOK_ROOT end