Class: Icalendar::Event

Inherits:
Component
  • Object
show all
Defined in:
lib/agcaldav/event.rb

Overview

A Event calendar component is a grouping of component properties, and possibly including Alarm calendar components, that represents a scheduled amount of time on a calendar. For example, it can be an activity; such as a one-hour long, department meeting from 8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time on an individual calendar.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEvent

Returns a new instance of Event.



99
100
101
102
103
104
105
# File 'lib/agcaldav/event.rb', line 99

def initialize()
  super("VEVENT")

  # Now doing some basic initialization
  sequence 0
  timestamp DateTime.now
end

Instance Attribute Details

#tzidObject

Returns the value of attribute tzid.



24
25
26
# File 'lib/agcaldav/event.rb', line 24

def tzid
  @tzid
end

Instance Method Details

#alarm(&block) ⇒ Object



107
108
109
110
111
112
113
114
# File 'lib/agcaldav/event.rb', line 107

def alarm(&block)
  a = Alarm.new
  self.add a

  a.instance_eval(&block) if block

  a
end

#occurrences_starting(time) ⇒ Object



116
117
118
# File 'lib/agcaldav/event.rb', line 116

def occurrences_starting(time)
  recurrence_rules.first.occurrences_of_event_starting(self, time)
end