class Icalendar::Event

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.

Attributes

tzid[RW]

Specifies the timezone for the event

Public Class Methods

new() click to toggle source
Calls superclass method Icalendar::Component.new
# File lib/icalendar/component/event.rb, line 106
def initialize()
  super("VEVENT")

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

Public Instance Methods

alarm(&block) click to toggle source
# File lib/icalendar/component/event.rb, line 115
def alarm(&block)
  a = Alarm.new
  self.add a

  a.instance_eval(&block) if block

  a
end
occurrences_starting(time) click to toggle source
# File lib/icalendar/component/event.rb, line 124
def occurrences_starting(time)
  recurrence_rules.first.occurrences_of_event_starting(self, time)
end