Created
March 27, 2012 07:06
-
-
Save yaauie/2213551 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module NoisyRedis | |
module NoisyClient | |
def process(commands,&b) | |
r = super(commands,&b) | |
puts "#{Process.pid}>>#{self.class.name}\#process(#{commands.inspect}#{block_given? ? ' <&block>' : ''}) \#=> #{r.inspect}" | |
r | |
end | |
end | |
def self.extended(redis) | |
redis.client.extend(NoisyClient) | |
end | |
end | |
redis.extend(NoisyRedis) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment