Class: Auger::Redis
Instance Attribute Summary
Attributes inherited from Connection
#connection, #gateway, #options, #requests, #response, #roles
Instance Method Summary
collapse
Methods inherited from Connection
#initialize, load, #method_missing, #timeout, #try_close, #try_open, #try_open_direct, #try_open_tunnel
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Auger::Connection
Instance Method Details
#close(redis) ⇒ Object
17
18
19
|
# File 'lib/auger/plugin/redis.rb', line 17
def close(redis)
redis.quit
end
|
#dbsize(&block) ⇒ Object
29
30
31
|
# File 'lib/auger/plugin/redis.rb', line 29
def dbsize(&block)
@requests << Auger::RedisDbsize.load(nil, &block)
end
|
#exists(key, &block) ⇒ Object
37
38
39
|
# File 'lib/auger/plugin/redis.rb', line 37
def exists(key, &block)
@requests << Auger::RedisExists.load(key, &block)
end
|
#get(key, &block) ⇒ Object
33
34
35
|
# File 'lib/auger/plugin/redis.rb', line 33
def get(key, &block)
@requests << Auger::RedisGet.load(key, &block)
end
|
#info(&block) ⇒ Object
25
26
27
|
# File 'lib/auger/plugin/redis.rb', line 25
def info(&block)
@requests << Auger::RedisInfo.load(nil, &block)
end
|
#open(host, options) ⇒ Object
13
14
15
|
# File 'lib/auger/plugin/redis.rb', line 13
def open(host, options)
::Redis.new options.merge({:host => host, :thread_safe => true, :port => options[:port]})
end
|
#ping(&block) ⇒ Object
21
22
23
|
# File 'lib/auger/plugin/redis.rb', line 21
def ping(&block)
@requests << Auger::RedisPing.load(nil, &block)
end
|