class RedisConnection
Public Class Methods
new(options={})
click to toggle source
# File lib/redis_connection.rb, line 5 def initialize(options={}) key = options.keys.sort.map{|k| "#{k}:#{options[k]}"}.join(",") unless @@redis_connections.has_key?(key) @@redis_connections[key] = Redis.new(options) end @current_connection = @@redis_connections[key] @current_connection end
Public Instance Methods
method_missing(m, *args, &block)
click to toggle source
Calls superclass method
# File lib/redis_connection.rb, line 14 def method_missing(m, *args, &block) if @current_connection.respond_to?(m) @current_connection.send(m, *args) else super end end