active_redis_db 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_redis_db/key.rb +2 -0
- data/lib/active_redis_db/sorted_set.rb +4 -0
- data/lib/active_redis_db/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b614087f4ecbc4c4fae0539be1708aae3b024020dff992800b27422dbddb655a
|
4
|
+
data.tar.gz: ab625306cdb81e1c1d0c2cebb8de74d5122881aa9813e2f783664356d4d959bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 686715fde5e04bafcf8e53ebb02ba0651873763df5dbeccc9aad886743da488a85c43864b79f54a5ac559d38e0835282a838a388f37e4c2e3bccb9610294744c
|
7
|
+
data.tar.gz: 7a2b488d2f582f4cf7eef4130928e9d7d266416428e3e07d71966ef6b1cbf69eb7775f43521f83647456746ef0cc3ac43aaf2bb1ccc4db3be87cd88a88fe35fd
|
data/lib/active_redis_db/key.rb
CHANGED
@@ -135,6 +135,10 @@ class ActiveRedisDB::SortedSet < ActiveRedisDB::Base
|
|
135
135
|
client.zincrby(normalize_key(key), count, value)
|
136
136
|
end
|
137
137
|
|
138
|
+
def decrement(key, value, count)
|
139
|
+
client.zincrby(normalize_key(key), -(count.abs), value)
|
140
|
+
end
|
141
|
+
|
138
142
|
def destroy(key, at)
|
139
143
|
client.zrem(normalize_key(key), at)
|
140
144
|
end
|