Skip to content

Commit a06456c

Browse files
authored
Merge pull request #1269 from FujiokaD/doc/write_redis_doc_url
doc: add redis doc URL written acceptable regular expressions patterns
2 parents f236b12 + fd69ea0 commit a06456c

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

lib/redis/commands/hashes.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ def hgetall(key)
222222
# - `:count => Integer`: return count keys at most per iteration
223223
#
224224
# @return [String, Array<[String, String]>] the next cursor and all found keys
225+
#
226+
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
225227
def hscan(key, cursor, **options)
226228
_scan(:hscan, cursor, [key], **options) do |reply|
227229
[reply[0], reply[1].each_slice(2).to_a]
@@ -239,6 +241,8 @@ def hscan(key, cursor, **options)
239241
# - `:count => Integer`: return count keys at most per iteration
240242
#
241243
# @return [Enumerator] an enumerator for all found keys
244+
#
245+
# See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details
242246
def hscan_each(key, **options, &block)
243247
return to_enum(:hscan_each, key, **options) unless block_given?
244248

lib/redis/commands/keys.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module Keys
2222
# - `:type => String`: return keys only of the given type
2323
#
2424
# @return [String, Array<String>] the next cursor and all found keys
25+
#
26+
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
2527
def scan(cursor, **options)
2628
_scan(:scan, cursor, [], **options)
2729
end
@@ -46,6 +48,8 @@ def scan(cursor, **options)
4648
# - `:type => String`: return keys only of the given type
4749
#
4850
# @return [Enumerator] an enumerator for all found keys
51+
#
52+
# See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details
4953
def scan_each(**options, &block)
5054
return to_enum(:scan_each, **options) unless block_given?
5155

@@ -282,6 +286,8 @@ def exists?(*keys)
282286
#
283287
# @param [String] pattern
284288
# @return [Array<String>]
289+
#
290+
# See the [Redis Server KEYS documentation](https://redis.io/docs/latest/commands/keys/) for further details
285291
def keys(pattern = "*")
286292
send_command([:keys, pattern]) do |reply|
287293
if reply.is_a?(String)

lib/redis/commands/pubsub.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,20 @@ def unsubscribe(*channels)
2929
end
3030

3131
# Listen for messages published to channels matching the given patterns.
32+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
3233
def psubscribe(*channels, &block)
3334
_subscription(:psubscribe, 0, channels, block)
3435
end
3536

3637
# Listen for messages published to channels matching the given patterns.
3738
# Throw a timeout error if there is no messages for a timeout period.
39+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
3840
def psubscribe_with_timeout(timeout, *channels, &block)
3941
_subscription(:psubscribe_with_timeout, timeout, channels, block)
4042
end
4143

4244
# Stop listening for messages posted to channels matching the given patterns.
45+
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details
4346
def punsubscribe(*channels)
4447
_subscription(:punsubscribe, 0, channels, nil)
4548
end

lib/redis/commands/sets.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ def sunionstore(destination, *keys)
184184
# - `:count => Integer`: return count keys at most per iteration
185185
#
186186
# @return [String, Array<String>] the next cursor and all found members
187+
#
188+
# See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details
187189
def sscan(key, cursor, **options)
188190
_scan(:sscan, cursor, [key], **options)
189191
end
@@ -199,6 +201,8 @@ def sscan(key, cursor, **options)
199201
# - `:count => Integer`: return count keys at most per iteration
200202
#
201203
# @return [Enumerator] an enumerator for all keys in the set
204+
#
205+
# See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details
202206
def sscan_each(key, **options, &block)
203207
return to_enum(:sscan_each, key, **options) unless block_given?
204208

lib/redis/commands/sorted_sets.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,8 @@ def zdiffstore(*args)
817817
#
818818
# @return [String, Array<[String, Float]>] the next cursor and all found
819819
# members and scores
820+
#
821+
# See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details
820822
def zscan(key, cursor, **options)
821823
_scan(:zscan, cursor, [key], **options) do |reply|
822824
[reply[0], FloatifyPairs.call(reply[1])]
@@ -834,6 +836,8 @@ def zscan(key, cursor, **options)
834836
# - `:count => Integer`: return count keys at most per iteration
835837
#
836838
# @return [Enumerator] an enumerator for all found scores and members
839+
#
840+
# See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details
837841
def zscan_each(key, **options, &block)
838842
return to_enum(:zscan_each, key, **options) unless block_given?
839843

lib/redis/distributed.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,12 +948,14 @@ def unsubscribe(*channels)
948948
end
949949

950950
# Listen for messages published to channels matching the given patterns.
951+
# See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) for further details
951952
def psubscribe(*channels, &block)
952953
raise NotImplementedError
953954
end
954955

955956
# Stop listening for messages posted to channels matching the given
956957
# patterns.
958+
# See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) for further details
957959
def punsubscribe(*channels)
958960
raise NotImplementedError
959961
end

0 commit comments

Comments
 (0)