Class: Kredis::Types::Flag
Instance Attribute Summary collapse
Attributes inherited from Proxying
#key, #proxy
Instance Method Summary
collapse
#initialize
Methods inherited from Proxying
#failsafe, #initialize, proxying, #unproxied_redis
Instance Attribute Details
#expires_in ⇒ Object
Returns the value of attribute expires_in.
8
9
10
|
# File 'lib/kredis/types/flag.rb', line 8
def expires_in
@expires_in
end
|
Instance Method Details
#mark(expires_in: nil, force: true) ⇒ Object
10
11
12
|
# File 'lib/kredis/types/flag.rb', line 10
def mark(expires_in: nil, force: true)
set 1, ex: expires_in || self.expires_in, nx: !force
end
|
#marked? ⇒ Boolean
14
15
16
|
# File 'lib/kredis/types/flag.rb', line 14
def marked?
exists?
end
|
#remove ⇒ Object
18
19
20
|
# File 'lib/kredis/types/flag.rb', line 18
def remove
del
end
|