| Class | TaskJuggler::ICalendar |
| In: |
lib/taskjuggler/ICalendar.rb
|
| Parent: | Object |
This class implements a very basic RFC5545 compliant iCalendar file generator. It currently only supports a very small subset of the tags that are needed for TaskJuggler.
| LINELENGTH | = | 75 | The maximum allowed length of a content line without line end character. |
| creationDate | [RW] | |
| lastModified | [RW] | |
| uid | [R] |
# File lib/taskjuggler/ICalendar.rb, line 180 def initialize(uid) @uid = "#{AppConfig.packageName}-#{uid}" @creationDate = @lastModified = TjTime.new.utc @todos = [] @events = [] @journals = [] end
# File lib/taskjuggler/ICalendar.rb, line 204 def to_s str = "BEGIN:VCALENDAR\nPRODID:-//The \#{AppConfig.softwareName} Project/NONSGML \#{AppConfig.softwareName} \#{AppConfig.version}//EN\nVERSION:2.0\n\n" @todos.each { |todo| str += todo.to_s } @events.each { |event| str += event.to_s } @journals.each { |journal| str += journal.to_s } str << "END:VCALENDAR\n" foldLines(str) end