Class: Icalendar2::Event

Inherits:
Component::Base show all
Defined in:
lib/icalendar2/component/event.rb

Overview

Constant Summary collapse

VALUE =
"VEVENT"

Instance Method Summary collapse

Methods inherited from Component::Base

accepts, #new_timestamp, #new_uid, requires, #set_property, #valid?

Constructor Details

#initializeEvent

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 = new_timestamp
end

Instance Method Details

#to_icalObject



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