class Calendav::Event
Constants
- ATTRIBUTES
Attributes
attributes[R]
Public Class Methods
from_xml(host, node)
click to toggle source
# File lib/calendav/event.rb, line 10 def self.from_xml(host, node) new( { url: ContextualURL.call(host, node.xpath("./dav:href").text) }.merge( Parsers::EventXML.call(node) ) ) end
new(attributes = {})
click to toggle source
# File lib/calendav/event.rb, line 20 def initialize(attributes = {}) @attributes = attributes end
Public Instance Methods
dtend()
click to toggle source
# File lib/calendav/event.rb, line 40 def dtend inner_event.dtend end
dtstart()
click to toggle source
# File lib/calendav/event.rb, line 36 def dtstart inner_event.dtstart end
summary()
click to toggle source
# File lib/calendav/event.rb, line 32 def summary inner_event.summary end
to_h()
click to toggle source
# File lib/calendav/event.rb, line 28 def to_h attributes.dup end
unloaded?()
click to toggle source
# File lib/calendav/event.rb, line 44 def unloaded? calendar_data.nil? end
Private Instance Methods
inner_calendar()
click to toggle source
# File lib/calendav/event.rb, line 52 def inner_calendar Icalendar::Calendar.parse(calendar_data).first end
inner_event()
click to toggle source
# File lib/calendav/event.rb, line 56 def inner_event @inner_event = inner_calendar.events.first end