Class: TaskJuggler::ICalendar::Event
- Defined in:
- lib/taskjuggler/ICalendar.rb
Overview
Stores the data of an VTODO component and can generate one.
Instance Attribute Summary
Attributes inherited from Component
#description, #organizer, #relatedTo, #uid
Instance Method Summary collapse
-
#initialize(ical, uid, summary, startDate, endDate) ⇒ Event
constructor
Create the Event object with some mandatory data.
-
#to_s ⇒ Object
Generate the VEVENT record as String.
Methods inherited from Component
Constructor Details
#initialize(ical, uid, summary, startDate, endDate) ⇒ Event
Create the Event object with some mandatory data. ical is a reference to the parent ICalendar object. uid is a unique pattern used to generate the UID tag. summary is a String for SUMMARY. startDate is used to generate DTSTART. endDate is used to either generate the COMPLETED or DUE tag.
139 140 141 142 143 144 145 146 147 |
# File 'lib/taskjuggler/ICalendar.rb', line 139 def initialize(ical, uid, summary, startDate, endDate) super(ical, uid, summary, startDate) @ical.addEvent(self) # Mandatory attributes @endDate = endDate # Optional attributes @priority = 1 end |
Instance Method Details
#to_s ⇒ Object
Generate the VEVENT record as String.
150 151 152 153 154 155 156 157 158 |
# File 'lib/taskjuggler/ICalendar.rb', line 150 def to_s super do <<"EOT" PRIORITY:#{@priority} DTEND:#{dateTime(@endDate)} TRANSP:TRANSPARENT EOT end end |