class Tilia::Dav::MkCol
This class represents a MKCOL operation.
MKCOL creates a new collection. MKCOL comes in two flavours:
-
MKCOL with no body, signifies the creation of a simple collection.
-
MKCOL with a request body. This can create a collection with a specific resource type, and a set of properties that should be set on the new collection. This can be used to create caldav calendars, carddav address books, etc.
Property updates must always be atomic. This means that a property update must either completely succeed, or completely fail.
Attributes
A list of resource-types in clark-notation.
@var array
Public Class Methods
Creates the MKCOL object.
@param string[] resource_type
List of resourcetype values. @param array mutations List of new properties values.
# File lib/tilia/dav/mk_col.rb, line 25 def initialize(resource_type, mutations) @resource_type = resource_type super(mutations) end
Public Instance Methods
Returns true or false if the MKCOL operation has at least the specified resource type.
If the resourcetype is specified as an array, all resourcetypes are checked.
@param string|string[] resource_type
# File lib/tilia/dav/mk_col.rb, line 42 def resource_type?(resource_type) ([resource_type].flatten - @resource_type).size == 0 end