Method: Redis::Commands::Hashes#hlen

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

#hlen(key) ⇒ Integer

Get the number of fields in a hash.

Parameters:

  • key (String)

Returns:

  • (Integer)

    number of fields in the hash


10
11
12
# File 'lib/redis/commands/hashes.rb', line 10

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