# CalInvite::Providers::IcsDownload

Module for handling ICS file downloads with proper headers and file naming.
Provides utility methods for preparing ICS content for HTTP download.

_module_ defined in `lib/cal_invite/providers/ics_content.rb`

## Class methods

### `headers(filename, method: nil)`

Generates appropriate HTTP headers for ICS file download.

@param filename [String] The desired filename for the download
@param method [Symbol, nil] The iCalendar METHOD used to generate the content
  (:publish or :request). When given, it's added as a `method` parameter on
  the Content-Type header — this is what lets mail clients (Gmail, Outlook,
  Apple Mail) recognize the attachment as a meeting invite and render RSVP
  actions instead of a plain file attachment. Must match the METHOD in the
  .ics content itself.
@return [Hash] HTTP headers for the ICS file download

### `sanitize_filename(filename)`

Sanitizes a filename by removing potentially problematic characters.

@param filename [String] The filename to sanitize
@return [String] The sanitized filename

### `wrap_for_download(content, title, method: nil)`

Wraps ICS content with appropriate download information.

@param content [String] The ICS calendar content
@param title [String] The event title to use in the filename
@param method [Symbol, nil] The iCalendar METHOD used to generate `content`
  (:publish or :request); forwarded to {headers}. Must match the METHOD
  used when generating `content` itself.
@return [Hash] Hash containing content and headers for download
@example
  result = IcsDownload.wrap_for_download(ics_content, "team-meeting")
  # => { content: "BEGIN:VCALENDAR...", headers: { 'Content-Type' => '...' } }
