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.
The maximum allowed length of a content line without line end character.
Add a new VEVENT component. For internal use only!
# File lib/taskjuggler/ICalendar.rb, line 191 def addEvent(event) @events << event end
Add a new VJOURNAL component. For internal user only!
# File lib/taskjuggler/ICalendar.rb, line 196 def addJournal(journal) @journals << journal end
Add a new VTODO component. For internal use only!
# File lib/taskjuggler/ICalendar.rb, line 186 def addTodo(todo) @todos << todo end
# File lib/taskjuggler/ICalendar.rb, line 218 def dateTime(date) date.to_s("%Y%m%dT%H%M%SZ", 'UTC') end
# File lib/taskjuggler/ICalendar.rb, line 200 def to_s str = BEGIN:VCALENDARPRODID:-//The #{AppConfig.softwareName} Project/NONSGML #{AppConfig.softwareName} #{AppConfig.version}//ENVERSION:2.0 @todos.each { |todo| str += todo.to_s } @events.each { |event| str += event.to_s } @journals.each { |journal| str += journal.to_s } str << END:VCALENDAR foldLines(str) end
Generated with the Darkfish Rdoc Generator 2.