Method: Kthxbye#connect
- Defined in:
- lib/kthxbye.rb
#connect(redis_instance = nil) ⇒ Object
This is not necessary to call. Any of the methods that use redis Will make an inital call to connect to redis. Useful if you want to connect to an existing redis instance. Othewise, if called without params, it simply connects a new instance of redis.
68 69 70 |
# File 'lib/kthxbye.rb', line 68 def connect( redis_instance=nil ) @redis = ( redis_instance || Redis.new( :host => Config.[:redis_server], :port => Config.[:redis_port] ) ) end |