Posted at

[Rails] rake taskの途中終了はreturnじゃなくてnext

More than 5 years have passed since last update.

参考: http://stackoverflow.com/questions/2316475/how-do-i-return-early-from-a-rake-task

task :foo do

puts "printed"
next
puts "never printed"
end


A Rake task is basically a block


とのことです。