Module: Redis::Connection

Included in:
Bin::RubyRedisServer
Defined in:
lib/redis/connection.rb

Instance Method Summary collapse

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 authorized password
  :'+OK'
end

#redis_ECHO(str) ⇒ Object



20
21
22
# File 'lib/redis/connection.rb', line 20

def redis_ECHO str
  str
end

#redis_PINGObject



16
17
18
# File 'lib/redis/connection.rb', line 16

def redis_PING
  :'+PONG'
end

#redis_QUITObject



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