Class: VK::C
- Inherits:
-
O
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
#decr(n) ⇒ Object
136
137
138
|
# File 'lib/valkey/objects.rb', line 136
def decr n
VK.redis.call("SET", key, value + n.to_f)
end
|
#incr(n) ⇒ Object
133
134
135
|
# File 'lib/valkey/objects.rb', line 133
def incr n
VK.redis.call("SET", key, value + n.to_f)
end
|
#value ⇒ Object
139
140
141
|
# File 'lib/valkey/objects.rb', line 139
def value
VK.redis.call("GET", key).to_f
end
|
#value=(n) ⇒ Object
142
143
144
|
# File 'lib/valkey/objects.rb', line 142
def value= n
VK.redis.call("SET", key, n.to_f)
end
|