Class: UnifiedRedis::Adapter::Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/unified_redis/adapters/redis.rb

Instance Method Summary collapse

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

Yields:

  • (result)


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