Method: Redis#initialize
- Defined in:
- lib/redis.rb
#initialize(options = {}) ⇒ Redis
Create a new client instance
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/redis.rb', line 63 def initialize( = {}) @monitor = Monitor.new = .dup [:reconnect_attempts] = 1 unless .key?(:reconnect_attempts) if ENV["REDIS_URL"] && SERVER_URL_OPTIONS.none? { |o| .key?(o) } [:url] = ENV["REDIS_URL"] end inherit_socket = .delete(:inherit_socket) @subscription_client = nil @client = initialize_client() @client.inherit_socket! if inherit_socket end |