Class: VK::Q

Inherits:
O
  • Object
show all
Defined in:
lib/valkey/objects.rb

Instance Attribute Summary

Attributes inherited from O

#key

Instance Method Summary collapse

Methods inherited from O

#initialize

Constructor Details

This class inherits a constructor from VK::O

Instance Method Details

#<<(i) ⇒ Object



163
164
165
# File 'lib/valkey/objects.rb', line 163

def << i
  VK.redis.call("RPUSH", key, i)
end

#frontObject



166
167
168
# File 'lib/valkey/objects.rb', line 166

def front
  VK.redis.call("LPOP", key)
end

#lengthObject



160
161
162
# File 'lib/valkey/objects.rb', line 160

def length
  VK.redis.call("LLEN", key)
end

#value(&b) ⇒ Object



157
158
159
# File 'lib/valkey/objects.rb', line 157

def value &b
  VK.redis.call("LRANGE", key, 0, -1, 'WITHSCORES').each_with_index { |e, i| b.call(i, e) }
end