Class: MultiRedis::Future

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_redis/future.rb

Constant Summary collapse

FutureNotReady =
::MultiRedis::FutureNotReady.new

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value = nil) ⇒ Future

Returns a new instance of Future.


14
15
16
# File 'lib/multi_redis/future.rb', line 14

def initialize value = nil
  @value = value || FutureNotReady
end

Instance Attribute Details

#valueObject

Raises:


18
19
20
21
# File 'lib/multi_redis/future.rb', line 18

def value
  raise @value if @value.kind_of? RuntimeError
  @value
end