Download as Markdown llms.txt

class CalInvite::Providers::Ics

Generic ICS provider for generating standard iCalendar (.ics) files. This provider generates ICS files that are compatible with most calendar applications. Supports all-day events, regular events, and multi-day sessions with proper timezone handling.

This is the single RFC 5545 generator for the gem: {Ical} and {IcsContent} are subclasses kept for their public names and produce identical output.

@example Creating a regular event ICS file event = CalInvite::Event.new( title: “Team Meeting”, start_time: Time.now, end_time: Time.now + 3600, timezone: ‘America/New_York’ ) ics = CalInvite::Providers::Ics.new(event) ics_content = ics.generate

@example Creating an all-day event ICS file event = CalInvite::Event.new( title: “Company Holiday”, all_day: true, start_time: Date.today, end_time: Date.today + 1 ) ics_content = CalInvite::Providers::Ics.new(event).generate

@example Creating a multi-day event ICS file event = CalInvite::Event.new( title: “Conference”, multi_day_sessions: [ { start_time: Time.parse(“2024-04-01 09:00”), end_time: Time.parse(“2024-04-01 17:00”) }, { start_time: Time.parse(“2024-04-02 09:00”), end_time: Time.parse(“2024-04-02 17:00”) } ] ) ics_content = CalInvite::Providers::Ics.new(event).generate