Class: AgCalDAV::Request::Mkcalendar
- Defined in:
- lib/agcaldav/request.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#displayname ⇒ Object
Returns the value of attribute displayname.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(displayname = nil, description = nil) ⇒ Mkcalendar
constructor
A new instance of Mkcalendar.
- #to_xml ⇒ Object
Constructor Details
#initialize(displayname = nil, description = nil) ⇒ Mkcalendar
Returns a new instance of Mkcalendar.
17 18 19 20 |
# File 'lib/agcaldav/request.rb', line 17 def initialize(displayname = nil, description = nil) @displayname = displayname @description = description end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
15 16 17 |
# File 'lib/agcaldav/request.rb', line 15 def description @description end |
#displayname ⇒ Object
Returns the value of attribute displayname.
15 16 17 |
# File 'lib/agcaldav/request.rb', line 15 def displayname @displayname end |
Instance Method Details
#to_xml ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/agcaldav/request.rb', line 22 def to_xml xml.c :mkcalendar, NAMESPACES do xml.d :set do xml.d :prop do xml.d :displayname, displayname unless displayname.to_s.empty? xml.tag! "c:calendar-description", description, "xml:lang" => "en" unless description.to_s.empty? end end end end |