# frozen_string_literal: true require_relative 'base' class WCC::Media::Series < WCC::Media::Base active_record_shim do filters %w[ begin_on_or_before_date begin_on_or_after_date end_on_or_before_date end_on_or_after_date tag_id speaker_id scripture_book_id title_like legacy_id hide_from_internal_search ] end %w[ title subtitle summary external_playlist show_landing_page date_range messages_count hide_from_internal_search ].each do |att| define_method att do raw[att] end end def hide_from_internal_search raw['flags']['hide_from_internal_search'] || false end %w[ images series_type meta ].each do |att| define_method att do OpenStruct.new(raw[att]) if raw[att] end end end