Class: Futurist::Promise

Inherits:
Object
  • Object
show all
Defined in:
lib/futurist/promise.rb

Instance Method Summary collapse

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

#valueObject



7
8
9
# File 'lib/futurist/promise.rb', line 7

def value
  callable.call
end