timesを使った繰り返し処理です。
greeting = 'Hello world' n = 5 n.times do puts greeting end
実行した結果です。
Register as a new user and use Qiita more conveniently