a ruby library to exec block for N times