Skip to content

Instantly share code, notes, and snippets.

@yaauie
Created March 27, 2012 07:06
Show Gist options
  • Save yaauie/2213551 to your computer and use it in GitHub Desktop.
Save yaauie/2213551 to your computer and use it in GitHub Desktop.
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