Class: UnifiedRedis::Adapter::Redis
- Inherits:
-
Object
- Object
- UnifiedRedis::Adapter::Redis
- Defined in:
- lib/unified_redis/adapters/redis.rb
Instance Method Summary collapse
-
#initialize(redis) ⇒ Redis
constructor
A new instance of Redis.
- #method_missing(command, *args) {|result| ... } ⇒ Object
Constructor Details
#initialize(redis) ⇒ Redis
Returns a new instance of Redis.
4 5 6 |
# File 'lib/unified_redis/adapters/redis.rb', line 4 def initialize(redis) @redis = redis end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(command, *args) {|result| ... } ⇒ Object
8 9 10 11 12 |
# File 'lib/unified_redis/adapters/redis.rb', line 8 def method_missing(command, *args) result = @redis.send(command, *args) yield result if block_given? return result end |