lib/em-promise/q.rb in em-promise-1.1.0 vs lib/em-promise/q.rb in em-promise-1.1.1
- old
+ new
@@ -31,10 +31,11 @@
# regardless of when the promise was or will be resolved / rejected, calls one of
# the success or error callbacks asynchronously as soon as the result is available.
# The callbacks are called with a single argument, the result or rejection reason.
#
# @param [Proc, Proc, &blk] callbacks success, error, success_block
+ # @return [Promise] Returns an unresolved promise for chaining
def then(callback = nil, errback = nil, &blk)
result = Q.defer
callback ||= blk
@@ -166,10 +167,10 @@
#
# Combines multiple promises into a single promise that is resolved when all of the input
# promises are resolved.
#
- # @param [Promise] a number of promises that will be combined into a single promise
+ # @param [*Promise] Promises a number of promises that will be combined into a single promise
# @return [Promise] Returns a single promise that will be resolved with an array of values,
# each value corresponding to the promise at the same index in the `promises` array. If any of
# the promises is resolved with a rejection, this resulting promise will be resolved with the
# same rejection.
def self.all(*promises)