Class: Decidim::Meetings::Calendar::ComponentCalendar
- Inherits:
-
BaseCalendar
- Object
- BaseCalendar
- Decidim::Meetings::Calendar::ComponentCalendar
- 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
-
#events ⇒ Object
Renders the meetings in an ICalendar format.
Methods inherited from BaseCalendar
Constructor Details
This class inherits a constructor from Decidim::Meetings::Calendar::BaseCalendar
Instance Method Details
#events ⇒ Object
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 |