Class: Kredis::Types::Flag

Inherits:
Proxying show all
Defined in:
lib/kredis/types/flag.rb

Instance Attribute Summary

Attributes inherited from Proxying

#key, #proxy, #redis

Instance Method Summary collapse

Methods inherited from Proxying

#initialize, proxying

Constructor Details

This class inherits a constructor from Kredis::Types::Proxying

Instance Method Details

#mark(expires_in: nil) ⇒ Object



4
5
6
# File 'lib/kredis/types/flag.rb', line 4

def mark(expires_in: nil)
  set 1, ex: expires_in
end

#marked?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/kredis/types/flag.rb', line 8

def marked?
  exists?
end

#removeObject



12
13
14
# File 'lib/kredis/types/flag.rb', line 12

def remove
  del
end