class

TCal::Calendar::ICal

Inherits TCal::Calendar < Reference < Object

Generates an iCal calendar from a collection of MBTA Alerts. See RFC5545 for the iCal spec, and RFC7986 for additional properties.

Alerts can have an arbitrary set of periods. The equivalent iCal concept is RDATE;VALUE=PERIOD, but unfortunately most calendar apps don't support this part of the standard. Therefore each period is output as a separate event.

Constructors

new

Creates a calendar instance.

Source

Instance methods

to_s(io : IO) : Nil

Writes the iCal data to the specified IO.

Source