diff --git a/lib/redis/commands/hashes.rb b/lib/redis/commands/hashes.rb index a9a505af..6fb1460d 100644 --- a/lib/redis/commands/hashes.rb +++ b/lib/redis/commands/hashes.rb @@ -222,6 +222,8 @@ def hgetall(key) # - `:count => Integer`: return count keys at most per iteration # # @return [String, Array<[String, String]>] the next cursor and all found keys + # + # See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details def hscan(key, cursor, **options) _scan(:hscan, cursor, [key], **options) do |reply| [reply[0], reply[1].each_slice(2).to_a] @@ -239,6 +241,8 @@ def hscan(key, cursor, **options) # - `:count => Integer`: return count keys at most per iteration # # @return [Enumerator] an enumerator for all found keys + # + # See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details def hscan_each(key, **options, &block) return to_enum(:hscan_each, key, **options) unless block_given? diff --git a/lib/redis/commands/keys.rb b/lib/redis/commands/keys.rb index f507a924..489ae6f9 100644 --- a/lib/redis/commands/keys.rb +++ b/lib/redis/commands/keys.rb @@ -22,6 +22,8 @@ module Keys # - `:type => String`: return keys only of the given type # # @return [String, Array] the next cursor and all found keys + # + # See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details def scan(cursor, **options) _scan(:scan, cursor, [], **options) end @@ -46,6 +48,8 @@ def scan(cursor, **options) # - `:type => String`: return keys only of the given type # # @return [Enumerator] an enumerator for all found keys + # + # See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details def scan_each(**options, &block) return to_enum(:scan_each, **options) unless block_given? @@ -282,6 +286,8 @@ def exists?(*keys) # # @param [String] pattern # @return [Array] + # + # See the [Redis Server KEYS documentation](https://redis.io/docs/latest/commands/keys/) for further details def keys(pattern = "*") send_command([:keys, pattern]) do |reply| if reply.is_a?(String) diff --git a/lib/redis/commands/pubsub.rb b/lib/redis/commands/pubsub.rb index ccdababf..9340e911 100644 --- a/lib/redis/commands/pubsub.rb +++ b/lib/redis/commands/pubsub.rb @@ -29,17 +29,20 @@ def unsubscribe(*channels) end # Listen for messages published to channels matching the given patterns. + # See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details def psubscribe(*channels, &block) _subscription(:psubscribe, 0, channels, block) end # Listen for messages published to channels matching the given patterns. # Throw a timeout error if there is no messages for a timeout period. + # See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details def psubscribe_with_timeout(timeout, *channels, &block) _subscription(:psubscribe_with_timeout, timeout, channels, block) end # Stop listening for messages posted to channels matching the given patterns. + # See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details def punsubscribe(*channels) _subscription(:punsubscribe, 0, channels, nil) end diff --git a/lib/redis/commands/sets.rb b/lib/redis/commands/sets.rb index e0575139..b8b0b1cd 100644 --- a/lib/redis/commands/sets.rb +++ b/lib/redis/commands/sets.rb @@ -184,6 +184,8 @@ def sunionstore(destination, *keys) # - `:count => Integer`: return count keys at most per iteration # # @return [String, Array] the next cursor and all found members + # + # See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details def sscan(key, cursor, **options) _scan(:sscan, cursor, [key], **options) end @@ -199,6 +201,8 @@ def sscan(key, cursor, **options) # - `:count => Integer`: return count keys at most per iteration # # @return [Enumerator] an enumerator for all keys in the set + # + # See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details def sscan_each(key, **options, &block) return to_enum(:sscan_each, key, **options) unless block_given? diff --git a/lib/redis/commands/sorted_sets.rb b/lib/redis/commands/sorted_sets.rb index f07f9527..c9c2e0f0 100644 --- a/lib/redis/commands/sorted_sets.rb +++ b/lib/redis/commands/sorted_sets.rb @@ -817,6 +817,8 @@ def zdiffstore(*args) # # @return [String, Array<[String, Float]>] the next cursor and all found # members and scores + # + # See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details def zscan(key, cursor, **options) _scan(:zscan, cursor, [key], **options) do |reply| [reply[0], FloatifyPairs.call(reply[1])] @@ -834,6 +836,8 @@ def zscan(key, cursor, **options) # - `:count => Integer`: return count keys at most per iteration # # @return [Enumerator] an enumerator for all found scores and members + # + # See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details def zscan_each(key, **options, &block) return to_enum(:zscan_each, key, **options) unless block_given? diff --git a/lib/redis/distributed.rb b/lib/redis/distributed.rb index 33185d7c..53c0fab0 100644 --- a/lib/redis/distributed.rb +++ b/lib/redis/distributed.rb @@ -948,12 +948,14 @@ def unsubscribe(*channels) end # Listen for messages published to channels matching the given patterns. + # See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details def psubscribe(*channels, &block) raise NotImplementedError end # Stop listening for messages posted to channels matching the given # patterns. + # See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details def punsubscribe(*channels) raise NotImplementedError end