Class: Futurist::Promise
- Inherits:
-
Object
- Object
- Futurist::Promise
- Defined in:
- lib/futurist/promise.rb
Instance Method Summary collapse
-
#initialize(callable:) ⇒ Promise
constructor
A new instance of Promise.
- #value ⇒ Object
Constructor Details
#initialize(callable:) ⇒ Promise
Returns a new instance of Promise.
3 4 5 |
# File 'lib/futurist/promise.rb', line 3 def initialize(callable:) @callable = callable end |
Instance Method Details
#value ⇒ Object
7 8 9 |
# File 'lib/futurist/promise.rb', line 7 def value callable.call end |