Class R10K::Util::Attempt
In: lib/r10k/util/attempt.rb
Parent: Object

Attempt a series of dependent nested tasks and cleanly handle errors.

@api private

Methods

new   ok?   run   try  

Included Modules

R10K::Logging R10K::Util::Setopts

Attributes

status  [R]  @!attribute [r] status
  @return [Symbol] The status of this task

Public Class methods

Public Instance methods

Run this attempt to completion.

@todo determine the structure of the ret @return [Object] The aggregate result of all work performed.

Add another action to take for this attempt

@yieldparam [Object] The result of the previous action. @yieldreturn [Object, Array<Object>, NilClass] The result of this action.

  If the value is an object, it will be passed to the next attempt. If
  the value is an Array then each element will be individually passed
  to the next try. If the value is false or nil then no further action
  will be taken.

[Validate]