Class: Decidim::Meetings::Calendar::OrganizationCalendar

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

Overview

This class handles how to convert an organization meetings to the ICalendar format. It finds the public meeting components for that organization and delegates the work to the ComponentCalendar class.

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.



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

def events
  @events ||= components.map do |component|
    ComponentCalendar.new(component, @filters).events
  end.compact.join
end