Class: Icalendar::Event
- 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 collapse
-
#tzid ⇒ Object
Specifies the timezone for the event.
Attributes inherited from Component
Instance Method Summary collapse
- #alarm(&block) ⇒ Object
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #occurrences_starting(time) ⇒ Object
Methods inherited from Component
#add_component, #add_sliced_text, #custom_property, #escape_chars, #multi_property?, #multiline_property?, #new_uid, #print_component, #print_parameters, #print_properties, #remove_component, #respond_to?, #to_ical
Methods inherited from Base
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Icalendar::Component
Instance Attribute Details
#tzid ⇒ Object
Specifies the timezone for the event
31 32 33 |
# File 'lib/icalendar/component/event.rb', line 31 def tzid @tzid end |
Instance Method Details
#alarm(&block) ⇒ Object
115 116 117 118 119 120 121 122 |
# 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) ⇒ Object
124 125 126 |
# File 'lib/icalendar/component/event.rb', line 124 def occurrences_starting(time) recurrence_rules.first.occurrences_of_event_starting(self, time) end |