Class: Promise
- Inherits:
-
PromiseApi
- Object
- PromiseApi
- Promise
- Defined in:
- lib/bellite.rb
Overview
Class implements promise/future promise
Instance Method Summary collapse
-
#initialize(_then) ⇒ Promise
constructor
Constructing object with then-function.
-
#promise ⇒ Promise
Returns this object.
Methods inherited from PromiseApi
#always, #done, #fail, #then, #then_
Constructor Details
#initialize(_then) ⇒ Promise
Constructing object with then-function
601 602 603 604 605 |
# File 'lib/bellite.rb', line 601 def initialize(_then) if _then @_then = _then end end |
Instance Method Details
#promise ⇒ Promise
Returns this object
609 610 611 |
# File 'lib/bellite.rb', line 609 def promise return self end |