Class: Rubykiq::Connection

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rubykiq/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Connection

Initialize a new Connection object

Parameters:

  • options (Hash) (defaults to: {})


15
16
17
18
19
20
21
22
# File 'lib/rubykiq/connection.rb', line 15

def initialize(options = {})
  url = options.delete(:url) { determine_redis_provider }
  namespace = options.delete(:namespace)
  driver = options.delete(:driver)
  @redis_connection ||= build_conection(url, namespace, driver)
  @redis_client ||= @redis_connection.client
  return @redis_connection
end