module Sufia::Utils

Public Instance Methods

retry_unless(number_of_tries, condition, &block) click to toggle source

retry the block if the conditional call is true unless we hit the maximum tries

@param number_of_tries [enumerator] maximum number of times to retry the block (eg. 7.times) @param condition [#call] conditional to call and see if we SHOULD retry @yeild block [] code you want to run and retry

@return result of the block call

# File lib/sufia/models/utils.rb, line 13
def retry_unless(number_of_tries, condition, &block)
  self.class.retry_unless(number_of_tries, condition, &block)
end