Method: Redis::Commands::Server#config

Defined in:
lib/redis/commands/server.rb

#config(action, *args) ⇒ String, Hash

Get or set server configuration parameters.

Parameters:

  • action (Symbol)

    e.g. :get, :set, :resetstat

Returns:

  • (String, Hash)

    string reply, or hash when retrieving more than one property with CONFIG GET



25
26
27
28
29
30
31
32
33
# File 'lib/redis/commands/server.rb', line 25

def config(action, *args)
  send_command([:config, action] + args) do |reply|
    if reply.is_a?(Array) && action == :get
      Hashify.call(reply)
    else
      reply
    end
  end
end