Module: Protocol::Redis::Methods::Connection

Defined in:
lib/protocol/redis/methods/connection.rb

Instance Method Summary collapse

Instance Method Details

#auth(*arguments) ⇒ Object

Authenticate to the server.

Parameters:

  • username (String)

    Optional username, if Redis ACLs are used.

  • password (String)

    Required password.

See Also:



14
15
16
# File 'lib/protocol/redis/methods/connection.rb', line 14

def auth(*arguments)
	call("AUTH", *arguments)
end

#echo(message) ⇒ Object

Echo the given string.

Parameters:

  • message (String)

See Also:



21
22
23
# File 'lib/protocol/redis/methods/connection.rb', line 21

def echo(message)
	call("ECHO", message)
end

#ping(message) ⇒ Object

Ping the server.

Parameters:

  • message (String)

See Also:



28
29
30
# File 'lib/protocol/redis/methods/connection.rb', line 28

def ping(message)
	call("PING", message)
end

#quitObject

Close the connection.



34
35
36
# File 'lib/protocol/redis/methods/connection.rb', line 34

def quit
	call("QUIT")
end