Class: StandardProcedure::Async::Promises

Inherits:
Object
  • Object
show all
Defined in:
lib/standard_procedure/async/promises.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePromises

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

#promisesObject (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