diff options
author | Starfall <us@starfall.systems> | 2020-07-01 16:04:26 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-07-01 16:04:26 -0500 |
commit | 9b8ab85007cc9b527ba8c59a3624731cd8e46ffe (patch) | |
tree | 28cf79b4c73ec6d328136ea04a63321862096e5a /lib/redis | |
parent | 6ec1f4c99e51a13ca56d639b85168dfb874daf75 (diff) | |
parent | 665eb1affe7ba765af476e6f00096aad3af70735 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'lib/redis')
-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) |