Module: Redis::Connection
- Included in:
- Bin::RubyRedisServer
- Defined in:
- lib/redis/connection.rb
Instance Method Summary collapse
- #redis_AUTH(password) ⇒ Object
- #redis_ECHO(str) ⇒ Object
- #redis_PING ⇒ Object
- #redis_QUIT ⇒ Object
- #redis_SELECT(db_index) ⇒ Object
Instance Method Details
#redis_AUTH(password) ⇒ Object
4 5 6 7 |
# File 'lib/redis/connection.rb', line 4 def redis_AUTH password raise 'invalid password' unless password :'+OK' end |
#redis_ECHO(str) ⇒ Object
20 21 22 |
# File 'lib/redis/connection.rb', line 20 def redis_ECHO str str end |
#redis_PING ⇒ Object
16 17 18 |
# File 'lib/redis/connection.rb', line 16 def redis_PING :'+PONG' end |
#redis_QUIT ⇒ Object
24 25 26 27 |
# File 'lib/redis/connection.rb', line 24 def redis_QUIT send_redis :'+OK' :quit end |
#redis_SELECT(db_index) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/redis/connection.rb', line 9 def redis_SELECT db_index database = @databases[redis_i db_index] raise 'invalid DB index' unless database @database = database :'+OK' end |