module Redis::Commands::Sets
def sscan_each(key, **options, &block)
-
(Enumerator)
- an enumerator for all keys in the set
Parameters:
-
options
(Hash
) --
Other tags:
- Example: Retrieve all of the keys in a set -
def sscan_each(key, **options, &block) return to_enum(:sscan_each, key, **options) unless block_given? cursor = 0 loop do cursor, keys = sscan(key, cursor, **options) keys.each(&block) break if cursor == "0" end end