Class TaskJuggler::ICalendar::Event
In: lib/taskjuggler/ICalendar.rb
Parent: Component

Stores the data of an VTODO component and can generate one.

Methods

new   to_s  

Public Class methods

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.

[Source]

# File lib/taskjuggler/ICalendar.rb, line 140
      def initialize(ical, uid, summary, startDate, endDate)
        super(ical, uid, summary, startDate)
        @ical.addEvent(self)

        # Mandatory attributes
        @endDate = endDate
        # Optional attributes
        @priority = 1
      end

Public Instance methods

Generate the VEVENT record as String.

[Source]

# File lib/taskjuggler/ICalendar.rb, line 151
      def to_s
        super do
          "PRIORITY:\#{@priority}\nDTEND:\#{dateTime(@endDate)}\nTRANSP:TRANSPARENT\n"
        end
      end

[Validate]