Class: StandardProcedure::Async::Promises
- Inherits:
-
Object
- Object
- StandardProcedure::Async::Promises
- Defined in:
- lib/standard_procedure/async/promises.rb
Instance Attribute Summary collapse
-
#promises ⇒ Object
readonly
Returns the value of attribute promises.
Instance Method Summary collapse
- #future(&block) ⇒ Object
-
#initialize ⇒ Promises
constructor
A new instance of Promises.
Constructor Details
#initialize ⇒ Promises
Returns a new instance of Promises.
8 9 10 |
# File 'lib/standard_procedure/async/promises.rb', line 8 def initialize @promises = rails_is_loaded? ? ConcurrentRails::Promises : Concurrent::Promises end |
Instance Attribute Details
#promises ⇒ Object (readonly)
Returns the value of attribute promises.
12 13 14 |
# File 'lib/standard_procedure/async/promises.rb', line 12 def promises @promises end |
Instance Method Details
#future(&block) ⇒ Object
14 15 16 |
# File 'lib/standard_procedure/async/promises.rb', line 14 def future &block @promises.future(&block) end |