Class: MrDarcy::Promise::Synchronous

Inherits:
Base
  • Object
show all
Defined in:
lib/mr_darcy/promise/synchronous.rb

Overview

An implementation of synchronous promises, only for testing because it violates several rules of promises.

Instance Method Summary collapse

Methods inherited from Base

#fail, #initialize, #raise, #reject, #resolve, #then

Constructor Details

This class inherits a constructor from MrDarcy::Promise::Base

Instance Method Details

#finalObject


14
15
16
# File 'lib/mr_darcy/promise/synchronous.rb', line 14

def final
  self
end

#resultObject


10
11
12
# File 'lib/mr_darcy/promise/synchronous.rb', line 10

def result
  value
end