Method: Redis::Commands::Sets#sscan_each
- Defined in:
- lib/redis/commands/sets.rb
#sscan_each(key, **options, &block) ⇒ Enumerator
Scan a set
211 212 213 214 215 216 217 218 219 220 |
# File 'lib/redis/commands/sets.rb', line 211 def sscan_each(key, **, &block) return to_enum(:sscan_each, key, **) unless block_given? cursor = 0 loop do cursor, keys = sscan(key, cursor, **) keys.each(&block) break if cursor == "0" end end |