valkey-objects 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7c6c5ce3863e4e9bb256dd1218cd56f62c4b08a48c7c1f5a686aabcfc7d7308
4
- data.tar.gz: 147d64b217213c6eb1ff04a29a0e7dc51a8a46e45c2b0b087042d2df5d4aaa19
3
+ metadata.gz: 95b4899445513de587a18793a7a1f922aeb91765da84e16eb2d79d51e79b2c32
4
+ data.tar.gz: 4a1edf50e93b4a1651f8fa14e5858469187d3be433aa07edd9979b45dcf5b507
5
5
  SHA512:
6
- metadata.gz: 24a0bbca6bc325880dc8041b7ba5f76d4ce66863d39c5ba775a9199aab2a569df88e29df4b742f681831667b5a92170418eb796fbdecd8d688573e186d0f58fc
7
- data.tar.gz: 3284592d59354a5ccbf066cde5f715d9eef79c5d3e022ce93589e02c57cf23b0c88b09d4b93ecb4887900ea05f3e5dd8951f40d509b3e915834824c61f8ded57
6
+ metadata.gz: 32e9005b26cccf862edf94a206f31458b0e5a8257b36fc7302dce6f4496188ec0b0e1f22825ce5a85a1788bb71e9922b08ccc61030ec4a9a0c8a6165ebdcfbba
7
+ data.tar.gz: 6164abc6a2f1fdfa391cbd745d1b152150ddc21c5dc41ae2aa339fbcf23fb118248d1a140f78dd073d47ee54cad7f5aeb0bf95e2b10996e382c38943598a67c2
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Valkey
4
4
  module Objects
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
@@ -266,6 +266,9 @@ module VK
266
266
  def []= k,v
267
267
  VK.redis.call("HMSET", key, k, v);
268
268
  end
269
+ def to_h
270
+ VK.redis.call("HGETALL", key);
271
+ end
269
272
  end
270
273
 
271
274
  class Q < O
@@ -302,6 +305,13 @@ module VK
302
305
  def value &b
303
306
  VK.redis.call("SMEMBERS", key).each_with_index { |e, i| b.call(i, e) }
304
307
  end
308
+ def include? k
309
+ if VK.redis.call("SMISMEMBER", key, k)[0] == 1
310
+ return false
311
+ else
312
+ return true
313
+ end
314
+ end
305
315
  def length
306
316
  VK.redis.call("SCARD", key)
307
317
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkey-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson