Class: Decidim::Meetings::Calendar::ComponentCalendar

Inherits:
BaseCalendar
  • Object
show all
Defined in:
app/services/decidim/meetings/calendar/component_calendar.rb

Overview

This class handles how to convert a component meetings to the ICalendar format. It caches its result until the component is updated again.

Instance Method Summary collapse

Methods inherited from BaseCalendar

#calendar, for, #initialize

Constructor Details

This class inherits a constructor from Decidim::Meetings::Calendar::BaseCalendar

Instance Method Details

#eventsObject

Renders the meetings in an ICalendar format. It caches the results in Rails’ cache.

Returns a String.



13
14
15
16
17
# File 'app/services/decidim/meetings/calendar/component_calendar.rb', line 13

def events
  filtered_meetings.map do |meeting|
    MeetingCalendar.new(meeting).events
  end.compact.join
end