Method: Fear::Future#value

Defined in:
lib/fear/future.rb

#valueFear::Option<Fear::Try>

The value of this Future.

Returns:

  • (Fear::Option<Fear::Try>)

    if the future is not completed the returned value will be Fear::None. If the future is completed the value will be Fear::Some<Fear::Success> if it contains a valid result, or Fear::Some<Fear::Failure> if it contains an error.



213
214
215
# File 'lib/fear/future.rb', line 213

def value
  Fear.option(promise.value(0))
end