Method: Redis::Commands::Keys#type

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

#type(key) ⇒ String

Determine the type stored at key.

Parameters:

  • key (String)

Returns:

  • (String)

    string, list, set, zset, hash or none



441
442
443
# File 'lib/redis/commands/keys.rb', line 441

def type(key)
  send_command([:type, key])
end