Class: Icalendar2::Event
- Inherits:
-
Component::Base
- Object
- Component::Base
- Icalendar2::Event
- Defined in:
- lib/icalendar2/component/event.rb
Overview
Constant Summary collapse
- VALUE =
"VEVENT"
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #to_ical ⇒ Object
Methods inherited from Component::Base
accepts, #new_timestamp, #new_uid, requires, #set_property, #valid?
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
13 14 15 16 17 |
# File 'lib/icalendar2/component/event.rb', line 13 def initialize super self.uid = new_uid self.dtstamp = end |
Instance Method Details
#to_ical ⇒ Object
19 20 21 22 23 24 |
# File 'lib/icalendar2/component/event.rb', line 19 def to_ical str = "#{Tokens::COMPONENT_BEGIN}:#{VALUE}#{Tokens::CRLF}" str << properties_to_ical #str << alarm_to_ical str << "#{Tokens::COMPONENT_END}:#{VALUE}#{Tokens::CRLF}" end |