From 048609cf0e2a928caf6f6c08281df8ae865721e7 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 31 Oct 2024 10:26:35 -0400 Subject: [PATCH] Add `Timeline` wrapper class --- app/lib/timeline.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 app/lib/timeline.rb diff --git a/app/lib/timeline.rb b/app/lib/timeline.rb new file mode 100644 index 0000000000..2fd17d4d9b --- /dev/null +++ b/app/lib/timeline.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Timeline + extend Redisable + + module_function + + def subscribed?(timeline) + redis.exists?("subscribed:#{timeline}") + end +end