Sha256: f3c187b4ceabb4a1be67c76a5e388ede7d7c28d7b6b15a001dc7ad3a2aa38290
Contents?: true
Size: 964 Bytes
Versions: 30
Compression:
Stored size: 964 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings module Calendar # 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. class OrganizationCalendar < BaseCalendar # Renders the meetings in an ICalendar format. It caches the results in # Rails' cache. # # Returns a String. def events @events ||= components.map do |component| ComponentCalendar.new(component, @filters).events end.compact.join end private alias organization resource # Finds the component meetings. # # Returns a collection of Meetings. def components Decidim::PublicComponents.for(organization, manifest_name: :meetings) end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems