Method: Redis#zscan_each
- Defined in:
- lib/redis.rb
#zscan_each(key, options = {}, &block) ⇒ Enumerator
Scan a sorted set
2393 2394 2395 2396 2397 2398 2399 2400 2401 |
# File 'lib/redis.rb', line 2393 def zscan_each(key, ={}, &block) return to_enum(:zscan_each, key, ) unless block_given? cursor = 0 loop do cursor, values = zscan(key, cursor, ) values.each(&block) break if cursor == "0" end end |