Class: SSDB::Future
- Inherits:
- BasicObject
- Defined in:
- lib/ssdb/future.rb
Instance Method Summary collapse
- #class ⇒ Object
-
#initialize(command) ⇒ Future
constructor
A new instance of Future.
- #inspect ⇒ Object
- #instance_of?(klass) ⇒ Boolean
- #value ⇒ Object
- #value=(value) ⇒ Object
Constructor Details
#initialize(command) ⇒ Future
Returns a new instance of Future.
3 4 5 |
# File 'lib/ssdb/future.rb', line 3 def initialize(command) @command = command end |
Instance Method Details
#inspect ⇒ Object
7 8 9 |
# File 'lib/ssdb/future.rb', line 7 def inspect "<SSDB::Future #{@command.inspect}>" end |
#instance_of?(klass) ⇒ Boolean
22 23 24 |
# File 'lib/ssdb/future.rb', line 22 def instance_of?(klass) klass == ::SSDB::Future end |
#value ⇒ Object
15 16 17 18 19 20 |
# File 'lib/ssdb/future.rb', line 15 def value unless defined?(@value) ::Kernel.raise ::SSDB::FutureNotReady, "Value of #{@command.inspect} is not ready" end @value end |
#value=(value) ⇒ Object
11 12 13 |
# File 'lib/ssdb/future.rb', line 11 def value=(value) @value = value end |