Module: Protocol::Redis::Methods::Server

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

Instance Method Summary collapse

Instance Method Details

#flushdb!Object

Remove all keys from the current database.

Parameters:

  • async (Enum)

See Also:



48
49
50
# File 'lib/protocol/redis/methods/server.rb', line 48

def flushdb!
	call('FLUSHDB')
end

#infoObject

Get information and statistics about the server.

Parameters:

  • section (String)

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/protocol/redis/methods/server.rb', line 31

def info
	 = {}
	
	call('INFO').each_line(Redis::Connection::CRLF) do |line|
		key, value = line.split(':')
		
		if value
			[key.to_sym] = value.chomp!
		end
	end
	
	return 
end