class Kredis::Types::Proxying

Attributes

key[RW]
proxy[RW]
redis[RW]

Public Class Methods

new(redis, key, **options) click to toggle source
# File lib/kredis/types/proxying.rb, line 10
def initialize(redis, key, **options)
  @redis, @key = redis, key
  @proxy = Kredis::Types::Proxy.new(redis, key)
  options.each { |key, value| send("#{key}=", value) }
end
proxying(*commands) click to toggle source
# File lib/kredis/types/proxying.rb, line 6
def self.proxying(*commands)
  delegate *commands, to: :proxy
end

Public Instance Methods

failsafe(returning: nil, &block) click to toggle source
# File lib/kredis/types/proxying.rb, line 16
def failsafe(returning: nil, &block)
  proxy.suppress_failsafe_with(returning: returning, &block)
end