class Tilia::Dav::Xml::Property::SupportedLock

This class represents the {DAV:}supportedlock property.

This property is defined here: tools.ietf.org/html/rfc4918#section-15.10

This property contains information about what kind of locks this server supports.

Public Instance Methods

xml_serialize(writer) click to toggle source

The xmlSerialize metod is called during xml writing.

Use the writer argument to write its own xml serialization.

An important note: do not create a parent element. Any element implementing XmlSerializble should only ever write what's considered its 'inner xml'.

The parent of the current element is responsible for writing a containing element.

This allows serializers to be re-used for different element names.

If you are opening new elements, you must also close them again.

@param Writer writer @return void

# File lib/tilia/dav/xml/property/supported_lock.rb, line 32
def xml_serialize(writer)
  writer.write_element(
    '{DAV:}lockentry',
    '{DAV:}lockscope' => { '{DAV:}exclusive' => nil },
    '{DAV:}locktype'  => { '{DAV:}write'     => nil }
  )
  writer.write_element(
    '{DAV:}lockentry',
    '{DAV:}lockscope' => { '{DAV:}shared' => nil },
    '{DAV:}locktype'  => { '{DAV:}write'  => nil }
  )
end