lib/redis_failover/client.rb in redis_failover-0.9.6 vs lib/redis_failover/client.rb in redis_failover-0.9.7

- old
+ new

@@ -62,9 +62,24 @@ parse_options(options) setup_zk build_clients end + # Stubs this method to return this RedisFailover::Client object. + # + # Some libraries (Resque) assume they can access the `client` via this method, + # but we don't want to actually ever expose the internal Redis connections. + # + # By returning `self` here, we can add stubs for functionality like #reconnect, + # and everything will Just Work. + # + # Takes an *args array for safety only. + # + # @return [RedisFailover::Client] + def client(*args) + self + end + # Specifies a callback to invoke when the current redis node list changes. # # @param [Proc] a callback with current master and slaves as arguments # # @example Usage