ruby on rails - rake task return on calling task -


i return rake task in calling task. possible?

something in example, able call task 1 , 1 independantly 1 , 2 sequentially.

task: 1    work    if work ok       task.return true    else       puts "task 1 ko"       task.return false    end end  task: 2    work    if work ok       task.return true    else       puts "task 2 ko"       task.return false    end end  task:   rake::task["one"].invoke    rake::task["two"].invoke end 

i not able return in "all" task. , "return" , abort("message") quit script.

solution : tasks lambda blocks that's why have use "next" instead "return".


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -