Class: Kredis::Types::Proxying
- Inherits:
-
Object
- Object
- Kredis::Types::Proxying
- Defined in:
- lib/kredis/types/proxying.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
Class Method Summary collapse
Instance Method Summary collapse
- #failsafe(returning: nil, &block) ⇒ Object
-
#initialize(redis, key, **options) ⇒ Proxying
constructor
A new instance of Proxying.
- #unproxied_redis ⇒ Object
Constructor Details
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/kredis/types/proxying.rb', line 6 def key @key end |
#proxy ⇒ Object
Returns the value of attribute proxy.
6 7 8 |
# File 'lib/kredis/types/proxying.rb', line 6 def proxy @proxy end |
Class Method Details
.proxying(*commands) ⇒ Object
8 9 10 |
# File 'lib/kredis/types/proxying.rb', line 8 def self.(*commands) delegate(*commands, to: :proxy) end |
Instance Method Details
#failsafe(returning: nil, &block) ⇒ Object
19 20 21 |
# File 'lib/kredis/types/proxying.rb', line 19 def failsafe(returning: nil, &block) proxy.suppress_failsafe_with(returning: returning, &block) end |
#unproxied_redis ⇒ Object
23 24 25 26 27 |
# File 'lib/kredis/types/proxying.rb', line 23 def unproxied_redis # Generally, this should not be used. It's only here for the rare case where we need to # call Redis commands that don't reference a key and don't want to be pipelined. @redis end |