class Redis::Future

Constants

FutureNotReady

Attributes

timeout[R]

Public Class Methods

new(command, transformation, timeout) click to toggle source
# File lib/redis/pipeline.rb, line 137
def initialize(command, transformation, timeout)
  @command = command
  @transformation = transformation
  @timeout = timeout
  @object = FutureNotReady
end

Public Instance Methods

==(_other) click to toggle source
Calls superclass method
# File lib/redis/pipeline.rb, line 144
def ==(_other)
  message = +"The methods == and != are deprecated for Redis::Future and will be removed in 4.2.0"
  message << " - You probably meant to call .value == or .value !="
  message << " (#{::Kernel.caller(1, 1).first})\n"

  ::Kernel.warn(message)

  super
end
_command() click to toggle source
# File lib/redis/pipeline.rb, line 163
def _command
  @command
end
_set(object) click to toggle source
# File lib/redis/pipeline.rb, line 158
def _set(object)
  @object = @transformation ? @transformation.call(object) : object
  value
end
class() click to toggle source
# File lib/redis/pipeline.rb, line 176
def class
  Future
end
inspect() click to toggle source
# File lib/redis/pipeline.rb, line 154
def inspect
  "<Redis::Future #{@command.inspect}>"
end
is_a?(other) click to toggle source
# File lib/redis/pipeline.rb, line 172
def is_a?(other)
  self.class.ancestors.include?(other)
end
value() click to toggle source
# File lib/redis/pipeline.rb, line 167
def value
  ::Kernel.raise(@object) if @object.is_a?(::RuntimeError)
  @object
end