Method: GCal4Ruby::Calendar#to_xml
- Defined in:
- lib/gcal4ruby/calendar.rb
#to_xml ⇒ Object
Returns the xml representation of the Calenar.
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/gcal4ruby/calendar.rb', line 214 def to_xml xml = REXML::Document.new(super) xml.root.elements.each(){}.map do |ele| case ele.name when "summary" ele.text = @summary when "timezone" ele.attributes["value"] = @timezone when "hidden" ele.attributes["value"] = @hidden.to_s when "color" ele.attributes["value"] = @color when "selected" ele.attributes["value"] = @selected.to_s end end xml.to_s end |