Class: Icalendar::Event
- Includes:
- Dtstart
- 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
-
#alarms ⇒ Object
Returns the value of attribute alarms.
Attributes inherited from Component
#name, #properties, #property_params
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #to_s ⇒ Object
Methods included from Dtstart
Methods inherited from Component
#method_missing, #print_string
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
13 14 15 16 17 |
# File 'lib/icalendar/component/event.rb', line 13 def initialize() super("VEVENT") @alarms = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Icalendar::Component
Instance Attribute Details
#alarms ⇒ Object
Returns the value of attribute alarms.
11 12 13 |
# File 'lib/icalendar/component/event.rb', line 11 def alarms @alarms end |
Instance Method Details
#to_s ⇒ Object
19 20 21 22 23 |
# File 'lib/icalendar/component/event.rb', line 19 def to_s print_string do |s| @alarms.each { |alarm| s << alarm.to_s } end end |