Method: Shards::Workflow::Base#loop_step

Defined in:
lib/shards/workflow/base.rb

#loop_stepObject



291
292
293
294
295
296
297
298
# File 'lib/shards/workflow/base.rb', line 291

def loop_step
  @current_loop||=0
  @total_loops||=step['total_loops']
  @current_loop+=1
  raise_wrong_text [current_loop,@total_loops] if current_loop>@total_loops
  output_message step['message'] % [step['correct'], step['seconds_between_loop']]
  sleep step['seconds_between_loop'] if @current_loop>1
end