Class: Calendav::Requests::UpdateCalendar
- Inherits:
-
Object
- Object
- Calendav::Requests::UpdateCalendar
- Defined in:
- lib/calendav/requests/update_calendar.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(attributes) ⇒ UpdateCalendar
constructor
A new instance of UpdateCalendar.
Constructor Details
#initialize(attributes) ⇒ UpdateCalendar
Returns a new instance of UpdateCalendar.
14 15 16 |
# File 'lib/calendav/requests/update_calendar.rb', line 14 def initialize(attributes) @attributes = attributes end |
Class Method Details
.call ⇒ Object
10 11 12 |
# File 'lib/calendav/requests/update_calendar.rb', line 10 def self.call(...) new(...).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/calendav/requests/update_calendar.rb', line 18 def call Nokogiri::XML::Builder.new do |xml| xml["dav"].propertyupdate(NAMESPACES) do xml["dav"].set do xml["dav"].prop do xml["dav"].displayname display_name if display_name if description xml["caldav"].public_send( :"calendar-description", description ) end if time_zone xml["caldav"].public_send(:"calendar-timezone", time_zone) end xml["apple"].public_send(:"calendar-color", color) if color end end end end end |