Class: Redis::Future
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | BasicObject |
Defined in: | lib/redis/pipeline.rb |
Constant Summary
-
FutureNotReady =
# File 'lib/redis/pipeline.rb', line 81::Redis::FutureNotReady.new
Class Method Summary
- .new(command, coerce, exception) ⇒ Future constructor
Instance Method Summary
Constructor Details
.new(command, coerce, exception) ⇒ Future
# File 'lib/redis/pipeline.rb', line 83
def initialize(command, coerce, exception) @command = command @object = FutureNotReady @coerce = coerce @exception = exception end
Instance Method Details
#_set(object)
[ GitHub ]# File 'lib/redis/pipeline.rb', line 94
def _set(object) @object = @coerce ? @coerce.call(object) : object value end
#class
[ GitHub ]# File 'lib/redis/pipeline.rb', line 108
def class Future end
#inspect
[ GitHub ]# File 'lib/redis/pipeline.rb', line 90
def inspect "<Redis::Future #{@command.inspect}>" end
#is_a?(other) ⇒ Boolean
# File 'lib/redis/pipeline.rb', line 104
def is_a?(other) self.class.ancestors.include?(other) end
#value
[ GitHub ]# File 'lib/redis/pipeline.rb', line 99
def value ::Kernel.raise(@object) if @exception && @object.is_a?(::StandardError) @object end