Class: Tilia::CalDav::Xml::Property::SupportedCollationSet

Inherits:
Object
  • Object
show all
Includes:
Xml::XmlSerializable
Defined in:
lib/tilia/cal_dav/xml/property/supported_collation_set.rb

Overview

supported-collation-set property

This property is a representation of the supported-collation-set property in the CalDAV namespace.

This property is defined in: tools.ietf.org/html/rfc4791#section-7.5.1

Instance Method Summary collapse

Instance Method Details

#xml_serialize(writer) ⇒ Object

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.

Parameters:

  • Writer

    writer

Returns:

  • void



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/tilia/cal_dav/xml/property/supported_collation_set.rb', line 32

def xml_serialize(writer)
  collations = [
    'i;ascii-casemap',
    'i;octet',
    'i;unicode-casemap'
  ]

  collations.each do |collation|
    writer.write_element("{#{Plugin::NS_CALDAV}}supported-collation", collation)
  end
end