def get_hour &block block.call end get_hour do hour = Time.hour.now.to_i hour.times do puts 'DONG' end end