Module: Looop

Defined in:
lib/looop.rb

Class Method Summary collapse

Class Method Details

.for(_initial_condition, evaluation_step, after_eval_step, &blk) ⇒ Object



2
3
4
5
6
7
# File 'lib/looop.rb', line 2

def self.for(_initial_condition, evaluation_step, after_eval_step, &blk)
  while(evaluation_step.call)
    yield
    after_eval_step.call
  end
end