Class: Celluloid::Future::Result

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

Overview

Wrapper for result values to distinguish them in mailboxes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, future) ⇒ Result

Returns a new instance of Result.


99
100
101
# File 'lib/celluloid/future.rb', line 99

def initialize(result, future)
  @result, @future = result, future
end

Instance Attribute Details

#futureObject (readonly)

Returns the value of attribute future


97
98
99
# File 'lib/celluloid/future.rb', line 97

def future
  @future
end

Instance Method Details

#valueObject


103
104
105
# File 'lib/celluloid/future.rb', line 103

def value
  @result.value
end