~cytrogen/masto-fe

ref: 8d5d707cc1b7ca5461f628bde1e59e0c2096a771 masto-fe/lib/redis/namespace_extensions.rb -rw-r--r-- 276 bytes
8d5d707c — Jay Prakash Kalia Update README.md (#25435) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class Redis
  module NamespaceExtensions
    def exists?(*args, &block)
      call_with_namespace('exists?', *args, &block)
    end
  end
end

Redis::Namespace::COMMANDS['exists?'] = [:first]
Redis::Namespace.prepend(Redis::NamespaceExtensions)