Method: Redis::Commands::Keys#keys
- Defined in:
- lib/redis/commands/keys.rb
#keys(pattern = "*") ⇒ Array<String>
Find all keys matching the given pattern.
See the Redis Server KEYS documentation for further details
291 292 293 294 295 296 297 298 299 |
# File 'lib/redis/commands/keys.rb', line 291 def keys(pattern = "*") send_command([:keys, pattern]) do |reply| if reply.is_a?(String) reply.split(" ") else reply end end end |