diff options
Diffstat (limited to 'lib/redis/namespace_extensions.rb')
-rw-r--r-- | lib/redis/namespace_extensions.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/redis/namespace_extensions.rb b/lib/redis/namespace_extensions.rb new file mode 100644 index 000000000..310a4f465 --- /dev/null +++ b/lib/redis/namespace_extensions.rb @@ -0,0 +1,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) |