Class: Icalendar::Event

Inherits:
Component show all
Defined in:
lib/icalendar/component/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

Attributes inherited from Component

#name, #properties, #property_params

Instance Method Summary collapse

Methods inherited from Component

#add_component, #custom_property, #multi_property?, #print_component, #print_parameter, #print_properties, #respond_to?, #to_ical

Constructor Details

#initializeEvent

Returns a new instance of Event.



103
104
105
# File 'lib/icalendar/component/event.rb', line 103

def initialize()
  super("VEVENT")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Icalendar::Component

Instance Method Details

#alarm(&block) ⇒ Object



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

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

  a.instance_eval &block if block

  a
end