Module: RedisPrescription::Adapters::RedisNamespace
- Defined in:
- lib/redis_prescription/adapters/redis_namespace.rb
Overview
redis-namespace adapter
Class Method Summary collapse
- .adapts?(redis) ⇒ Boolean
- .eval(redis, script, keys, argv) ⇒ Object
- .evalsha(redis, digest, keys, argv) ⇒ Object
Class Method Details
.adapts?(redis) ⇒ Boolean
10 11 12 |
# File 'lib/redis_prescription/adapters/redis_namespace.rb', line 10 def adapts?(redis) defined?(::Redis::Namespace) && redis.is_a?(::Redis::Namespace) end |
.eval(redis, script, keys, argv) ⇒ Object
14 15 16 17 18 |
# File 'lib/redis_prescription/adapters/redis_namespace.rb', line 14 def eval(redis, script, keys, argv) redis.eval(script, keys, argv) rescue ::Redis::CommandError => e raise CommandError, e. end |
.evalsha(redis, digest, keys, argv) ⇒ Object
20 21 22 23 24 |
# File 'lib/redis_prescription/adapters/redis_namespace.rb', line 20 def evalsha(redis, digest, keys, argv) redis.evalsha(digest, keys, argv) rescue ::Redis::CommandError => e raise CommandError, e. end |